point_angularvelocitysensor

From Source Entities
Jump to navigation Jump to search

Code classes:

point_angularvelocitysensor is a point entity present in all games except L4d2-small.pngLeft 4 Dead 2. It detects how fast an entity is spinning (angular velocity).

Bug: Does not detect the spinning speed of func_rotating.

Keyvalues[edit | edit source]

Target Entity Name (target) <target_destination>
Name of the entity whose angular velocity will be sensed.
Threshold Velocity (threshold) <float>
Speed to compare the Target Entity to, in degrees per second.
Fire Interval (fireinterval) <float>
Angular velocity must cross the threshold for at least this long to fire outputs.
Axis (axis) <vecline>
If Use Axis Helper is set, the entity will have to spin around this imaginary axis.
Use Axis Helper (usehelper) <boolean>
If set, the entity will will have to spin around an arbitrary axis defined by Axis.

Inputs[edit | edit source]

Test
Instantly checks the angular velocity of the Target Entity and fires appropriate outputs.
TestWithInterval
Checks the angular velocity of the Target Entity while accounting for Fire Interval and fires appropriate outputs.

Outputs[edit | edit source]

AngularVelocity <float>
Fires every time Target Entity rotates. Automatically puts the new magnitude of the angular velocity as the input parameter, unless overridden by the mapper.
Bug: Not exactly? Numbers are inconsistent when the object is revolving around something else, and said fluctuation isn't reflected in the other outputs.
OnGreaterThan
Fires when the target's angular velocity stays above Threshold Velocity for Fire Interval, if it was previously below.
OnLessThan
Fires when the target's angular velocity stays below Threshold Velocity for Fire Interval, if it was previously above.
OnGreaterThanOrEqualTo
Fires under the same conditions as OnGreaterThan.
OnLessThanOrEqualTo
Fires under the same conditions as OnLessThan.
OnEqualTo
Testing with cl_yawspeed reveals that the entity simply does not detect when the measured spinning speed is equal to Threshold Velocity.

See Also[edit | edit source]