Phys motor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Add internal names of keyvalue keys)
(-added class hierarchy, cleanup, fl template)
Line 1: Line 1:
{{CD|CPhysMotor|file1=phys_controller.cpp}}
{{base point|phys_motor}} It tries to spin a target entity at a particular speed.
{{base point|phys_motor}} It tries to spin a target entity at a particular speed.


Line 10: Line 11:


== Flags ==
== Flags ==
* 1 : Start On
{{fl|1|Start On}}
* 2 : No world collision
{{fl|2|No world collision|Disable world collisions on hinges}}
: Disable world collisions on hinges  
{{fl|4|Hinge Object|Motor also acts as a hinge constraining the object to this axis}}
* 4 : Hinge Object
{{fl|8|Orient Locally|Maintain local relationship with the attached object ([[FGD]] comment: "NOT WORKING YET")}}
: 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 ==
== Inputs ==
Line 22: Line 20:
{{IO|TurnOn|Turns motor on}}
{{IO|TurnOn|Turns motor on}}
{{IO|TurnOff|Turns motor off}}
{{IO|TurnOff|Turns motor off}}
{{I Targetname}}
== Outputs ==
{{O Targetname}}


[[Category:Forces]]
[[Category:Forces]]

Revision as of 10:43, 9 May 2023

C++ Class hierarchy
CPhysMotor
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ phys_controller.cpp

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

Start On : [1]
No world collision : [2]
Disable world collisions on hinges
Hinge Object : [4]
Motor also acts as a hinge constraining the object to this axis
Orient Locally : [8]
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