direct entity with mouse pointer?

Posted By: GreenDeveloper

direct entity with mouse pointer? - 02/09/13 16:27

how can i direct entity with mouse pointer
similar;
mouse_map = "mymodel.mdl";
Posted By: MasterQ32

Re: direct entity with mouse pointer? - 02/09/13 16:38

just take a look at mouse_ent
Posted By: GreenDeveloper

Re: direct entity with mouse pointer? - 02/09/13 17:04

Originally Posted By: MasterQ32
just take a look at mouse_ent


i want do this;


how can i do with mouse_ent?

i 'll try vec_set but it doesnt work.
Posted By: Uhrwerk

Re: direct entity with mouse pointer? - 02/09/13 17:08

You need to create the model for this and the calculate the world coordinates for the mouse position.

When using a normal entity you can use vec_for_screen:
http://www.conitec.net/beta/avec_for_screen.htm

When using a view entity you can use rel_for_screen:
http://www.conitec.net/beta/avec_rel_for_screen.htm
Posted By: GreenDeveloper

Re: direct entity with mouse pointer? - 02/09/13 19:04

Originally Posted By: Uhrwerk
You need to create the model for this and the calculate the world coordinates for the mouse position.

When using a normal entity you can use vec_for_screen:
http://www.conitec.net/beta/avec_for_screen.htm

When using a view entity you can use rel_for_screen:
http://www.conitec.net/beta/avec_rel_for_screen.htm


thx Uhrwerk, i greateful you. its work laugh
Posted By: Uhrwerk

Re: direct entity with mouse pointer? - 02/09/13 19:28

Did you fix the problem with the looped entity creation?
Posted By: GreenDeveloper

Re: direct entity with mouse pointer? - 02/09/13 19:46

Originally Posted By: Uhrwerk
Did you fix the problem with the looped entity creation?


yes its too basic but i didnt know this function. here code:
Code:
action kutu_act()
{
	player = my;
	VECTOR vectord;
	while(1)
	{
		mouse_mode = 4;  
    	vectord.x = mouse_pos.x;
    	vectord.y = mouse_pos.y;
    	vectord.z = 200;
    	vec_for_screen(vectord,camera);
    	vec_set(player.x, vectord);
    	wait(1);
	}
}

Posted By: Uhrwerk

Re: direct entity with mouse pointer? - 02/09/13 20:23

What about:
Code:
action kutu_act()
{
	player = my;
	mouse_mode = 4;  
	while(1)
	{
		my.x = mouse_pos.x;
		my.y = mouse_pos.y;
		my.z = 200;
		vec_for_screen(&(my->x),camera);
		wait(1);
	}
}

Posted By: GreenDeveloper

Re: direct entity with mouse pointer? - 02/09/13 20:54

Originally Posted By: Uhrwerk
What about:
Code:
action kutu_act()
{
	player = my;
	mouse_mode = 4;  
	while(1)
	{
		my.x = mouse_pos.x;
		my.y = mouse_pos.y;
		my.z = 200;
		vec_for_screen(&(my->x),camera);
		wait(1);
	}
}



hehe you 're amazing laugh
i am not good at with pointers laugh
© 2024 lite-C Forums