Raised This Month: $ Target: $400
 0% 

moving entity depending on players angle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ahujenas
Junior Member
Join Date: Oct 2006
Old 10-02-2012 , 08:47   Re: moving entity depending on players angle
Reply With Quote #4

What do you mean? I've tried doing this in a different way, but it returns 0 after vec normalize

Code:
static Float:aim[3],Float:vec[3],Float:endvec[3],Float:origin[3];
					fm_get_aim_origin( id, aim );

					pev(id,pev_origin, origin );
					client_print(id,print_chat,"origin %0.f %0.f %0.f",origin[0],origin[1],origin[2]);
					xs_vec_sub(aim,origin, vec );
					client_print(id,print_chat,"vec %0.f %0.f %0.f",vec[0],vec[1],vec[2]);
	                                xs_vec_normalize(vec,endvec);
				        client_print(id,print_chat,"normalized %0.f %0.f %0.f",endvec[0],endvec[1],endvec[2]);
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