Raised This Month: $51 Target: $400
 12% 

Entity rotation


Post New Thread Reply   
 
Thread Tools Display Modes
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 01-20-2022 , 05:44   Re: Entity rotation
Reply With Quote #11

Code:
/// rotation 
		new Float:TumbleVector[3]			
		TumbleVector[0]                                   // Wheel   - speed = 0
		TumbleVector[1] = random_float(800.0, 100.0)        // TEA      - speed = any random 100.0-800.0
		TumbleVector[2] = 50.0                                    //  HOURS    - speed = oly 50.0


set_pev(iEnt,pev_avelocity, TumbleVector)
the angular velocity of the object can call this with a fakemet command or with an engine command.
In which direction the player would not aim in this variant, the direction of the axes of rotation is constant.

Who knows how to set the angle of rotation relative to the sight.
For example, I want to roll the ball away from me always.
In the variant described above, it will always rotate (conditionally) to the West, wherever I look.

Last edited by TheVaskov; 01-20-2022 at 06:14.
TheVaskov 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 04:33.


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