Raised This Month: $ Target: $400
 0% 

Aiming Direction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-28-2009 , 14:25   Re: Aiming Direction
Reply With Quote #1

OK, I'll provide more info about what I'm doing.

I'm using
Code:
entity_set_int(Cl, EV_INT_flags, entity_get_int(Cl, EV_INT_flags) | FL_FROZEN);
After that no matter where you aim, your model position doesn't change. That's OK, I don't want it to change but I want it to be in a specific direction.

An example function would be welcome. Thanks.
__________________
hleV is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-28-2009 , 15:39   Re: Aiming Direction
Reply With Quote #2

Code:
AimToOrigin( client, Float:vAimOrigin[ 3 ] ) {     static iOrigin[ 3 ], Float:vOrigin[ 3 ];     get_user_origin( client, iOrigin, 1 );     IVecFVec( iOrigin, vOrigin );         static Float:vDirection[ 3 ];     xs_vec_sub( vAimOrigin, vOrigin, vDirection );         static Float:vAngles[ 3 ];     vector_to_angle( vDirection, vAngles );         entity_set_int( client, EV_INT_fixangle, 1 );     entity_set_vector( client, EV_VEC_angles, vAngles );     entity_set_vector( client, EV_VEC_v_angle, vAngles ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-28-2009 at 15:46.
Exolent[jNr] is offline
Reply



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 15:12.


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