Phys motor

From Valve Developer Community

This point-based entity is available in all Source games.

Table of contents

Entity Description

An entity that tries to spin a target entity at a particular speed.

Keyvalues

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
  • attach1
<target_destination> Object to apply the force to
  • speed
<float> Angular speed (units are degress/second)
  • spinup
<float> Spin-up time in seconds (also affects the rate at which speed changes happen)
  • inertiafactor
<float> System interia scale. Make this larger if the object being driven is constrained to a set of heavier objects.
  • axis
<vecline> Rotation axis

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

  • Kill
Removes this entity from the world.
Removes this entity and all its children from the world.
  • AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
  • SetSpeed <float>
Sets target speed
  • TurnOn
Turns motor on
  • TurnOff
Turns motor off

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator