Entity.AlignAngles
From GMod Wiki
| 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: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.AlignAngles]Entity.AlignAngles [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | This example will make ent1 face up from ent2. |
|---|---|
| Used on | |
| Code | ent1:SetAngles(ent1:AlignAngles(ent1:GetForward():Angle(), ent2:GetUp():Angle())) |
| Output | N/A |
Additional Notes
- This function returns an angle, and doesn't change the angle of the Entity on it's own.