Entity.SetAngles
From GMod Wiki
(Redirected from CLuaParticle.SetAngles)
Function | |
Syntax | Entity:SetAngles( Angle angles ) |
Description: | |
Sets the angles, or facing direction, of the entity. | |
Returns: | nil |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.SetAngles]Entity.SetAngles [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Set entity's rotation to: pitch = 20 deg, yaw = 90 deg, roll = 0 deg. |
---|---|
Used on | |
Code | self:SetAngles(Angle(20, 90, 0)) |
Output | Entity's rotation is modified. |
Additional Notes
- A normalized vector can be converted to a set of angles with the Vector:Angle function.
- This usually won't work on a player, as their angles are reset automatically when they look around. Use Player.SetEyeAngles instead.