Entity.AlignAngles

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:AlignAngles( Angle from, Angle to )
Description:
Rotates an object so that it's angles are aligned to the ones inputed.
Returns: Angle
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.AlignAngles]Entity.AlignAngles [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis example will make ent1 face up from ent2.
Used onNewerServer.png
Code
ent1:SetAngles(ent1:AlignAngles(ent1:GetForward():Angle(), ent2:GetUp():Angle()))
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox