Entity/GetMomentaryRotButtonPos

From Garry's Mod
Jump to: navigation, search
 Entity:GetMomentaryRotButtonPos( )

Description

Returns the amount a momentary_rot_button entity is turned based on the given angle. 0 meaning completely turned closed, 1 meaning completely turned open.

WARNING

This only works on momentary_rot_button entities.

Arguments

Angle turnAngle

The angle of rotation to compare - usually should be Entity:GetAngles.

Returns

number

The amount the momentary_rot_button is turned, ranging from 0 to 1, or nil if the entity is not a momentary_rot_button.
Personal tools
Navigation