I'm extremely new to lua, so this question may seem stupid. I looked around in the links at the top of the page but didn't see anything on this subject.
How would a make a command that rotates a certain player around by a specified number of degrees? Not just the head as I've seen in some bits of code, but the entire player?
Thanks in advance.
Edit: The rotation wouldn't need to be instantaneous either.
[b][url=wiki.garrysmod.com/?title=Entity.SetAngles]Entity.SetAngles [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Should work on the player too.
Thanks for the help.
Is there a way to set the rotation speed, or is it always instant?
u culd try seting the angfles gradualy
[QUOTE=stoogemeister;20171022]Thanks for the help.
Is there a way to set the rotation speed, or is it always instant?[/QUOTE]
That's instantly changing the orientation of the entity. To make it rotate over time requires you doing some form of physics to it.
[b][url=wiki.garrysmod.com/?title=PhysObj.AddAngleVelocity]PhysObj.AddAngleVelocity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
This is the function that would set the rotation speed. Making it rotate over time would require additonal constructs like adding it to a Think or PhysicsSimulate hook.
[QUOTE=fishface60;20173602]That's instantly changing the orientation of the entity. To make it rotate over time requires you doing some form of physics to it.
[b][url=wiki.garrysmod.com/?title=PhysObj.AddAngleVelocity]PhysObj.AddAngleVelocity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
This is the function that would set the rotation speed. Making it rotate over time would require additonal constructs like adding it to a Think or PhysicsSimulate hook.[/QUOTE]
The player isn't a physobject. He can just use trig to make the player gradually get their angles set.
Sorry, you need to Log In to post a reply to this thread.