Raised This Month: $ Target: $400
 0% 

moving entity depending on players angle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ahujenas
Junior Member
Join Date: Oct 2006
Old 09-25-2012 , 09:58   moving entity depending on players angle
Reply With Quote #1

Code:
new Float:origin[3];
					new Float:angle[3];
					entity_get_vector(id,EV_VEC_origin,origin);
					entity_get_vector(id,EV_VEC_angles,angle);
				//origin[0]-=3.5;
				//origin[2]-=0.8;
					origin[0] += ( -3.5 * floatsin( -angle, degrees) ),
					origin[2] += ( -0.8 * floatcos( -angle, degrees) ),
					entity_set_origin(KaiokenCharge[id], origin);
according to everything, this should move the current entity where the player rotates at the exact angle everytime,but it just sticks it into players waist ( 0,0,0 coordinates ) should I establish the angle also for this to take effect?
ahujenas is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode