Phys motor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added it to the newly created Category:Forces.)
m (Add internal names of keyvalue keys)
Line 2: Line 2:


== Keyvalues ==
== Keyvalues ==
{{KV|Rotation Speed|string|Angular speed (units are degrees/second)}}
{{KV|Rotation Speed|intn=speed|string|Angular speed (units are degrees/second)}}
{{KV|Spin up time|string|spin up time in seconds (also affects the rate at which speed changes happen)}}
{{KV|Spin up time|intn=spinup|string|spin up time in seconds (also affects the rate at which speed changes happen)}}
{{KV|System Interia Scale|float|Make this larger if the object being driven is constrained to a set of heavier objects.}}
{{KV|System Interia Scale|intn=inertiafactor|float|Make this larger if the object being driven is constrained to a set of heavier objects.}}
{{KV|Rotation Axis|vecline|The point to the Origin of the entity whose line the rotation axis.}}
{{KV|Rotation Axis|intn=axis|vecline|The point to the Origin of the entity whose line the rotation axis.}}
{{KV|Attached Object|target_destination|Object to apply the force to}}
{{KV|Attached Object|intn=attach1|target_destination|Object to apply the force to}}
{{KV Targetname}}
{{KV Targetname}}



Revision as of 05:40, 17 March 2021

Template:Base point It tries to spin a target entity at a particular speed.

Keyvalues

Rotation Speed (speed) <string>
Angular speed (units are degrees/second)
Spin up time (spinup) <string>
spin up time in seconds (also affects the rate at which speed changes happen)
System Interia Scale (inertiafactor) <float>
Make this larger if the object being driven is constrained to a set of heavier objects.
Rotation Axis (axis) <vector>
The point to the Origin of the entity whose line the rotation axis.
Attached Object (attach1) <targetname>
Object to apply the force to
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

  • 1 : Start On
  • 2 : No world collision
Disable world collisions on hinges
  • 4 : Hinge Object
Motor also acts as a hinge constraining the object to this axis
  • 8 : Orient Locally
Maintain local relationship with the attached object (FGD comment: "NOT WORKING YET")

Inputs

SetSpeed <floatRedirectInput/float>
Sets target speed
TurnOn
Turns motor on
TurnOff
Turns motor off


Outputs