trigger_vphysics_motion
trigger_vphysics_motion
is a brush entity available in the Half-Life 2 series.
It is a brush entity trigger that affects the motion of VPhysics objects that touch its volume. Optionally, it can also create a particle trail. A particle trail, when parented, takes the shape of a model or brush.
In code, it is represented by class
CTriggerVPhysicsMotion
, defined in triggers.cpp
.


Contents
Keyvalues
- Start Disabled
<boolean>
- Stay dormant until activated (probably with the Enable input).
- Filter Name
<filter>
- Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
- Scale gravity of objects in the field.
<float>
- Multiply gravity inside the trigger by this amount. Negative values make gravity reversed.
- Additional air density for drag
<float>
- Increases air drag. 1000 will produce a thick field of air like the ones seen in some places in the Citadel.
- Max velocity in field (0 disables)
<float>
- Limits the maximum speed of an object moving through the trigger. If this is set to below an object's terminal velocity, the object will fall abnormally.
- Max amount to reduce velocity per second when it exceeds the velocity limit (0 disables)
<float>
- When an object is going faster than Max velocity in field, gradually reduce the speed of the object by this amount.
- Velocity scale/drag
<float>
- Multiplier for velocity. Positive values above 1 will make objects go faster, potentially sending them flying. Negative values, or positive ones smaller than 1, will have effects similar to Additional air density for drag.
- Max angular velocity in field (degrees/s, 0 disables)
<float>
- Limits how fast an object can spin inside the trigger.
- Angular Velocity scale/drag
<float>
- Multiplier for spinning speeds. Negative values, or positive ones smaller than 1, will have effects similar to Max angular velocity in field.
- Linear force (0 disables)
<float>
- Push objects with a certain amount of force.
- Direction of linear force (Pitch Yaw Roll (Y Z X))
<angle>
- The direction that Linear force will push in.
- Particle Trail Material
<string>
- Name of a material to use for the particle trail, no name means no particle trail
- Particle Trail Lifetime
<float>
- Lifetime of the particles to emit
- Particle Trail Starting Sprite Size
<float>
- Starting size of the sprite to emit
- Particle Trail Ending Sprite Size
<float>
- Ending size of the sprite to emit
Flags
TriggerOnce:
- [
1
] : Clients - [
2
] : NPCs - [
4
] : Pushables - [
8
] : Physics Objects - [
16
] : Only player ally NPCs - [
32
] : Only clients in vehicles - [
64
] : Everything (not including physics debris) - [
512
] : Only clients *not* in vehicles - [
1024
] : Physics debris - [
2048
] : Only NPCs in vehicles (respects player ally flag) - [
4096
] : Disallow Bots - [
4096
] : Correctly account for object mass (trigger_push used to assume 100Kg) and multiple component physobjs (car, blob...) (in all games since)
- 4096 : Can move (through hierarchical attachment)
Inputs
SetGravityScale
<float>
- Scale gravity of objects in the field.
SetAdditionalAirDensity
<float>
- Additional air density for drag
SetVelocityLimit
<float>
- Max velocity in field.
SetVelocityLimitDelta
<float>
- Max amount to reduce velocity per second
SetVelocityLimitTime
<string>
- Accepts two arguments: the first is the new velocity limit, the second is the time it takes to ramp to that value
SetVelocityScale
<float>
- Velocity scale/drag
SetAngVelocityLimit
<float>
- Max angular velocity in field.
SetAngVelocityScale
<float>
- Angular Velocity scale/drag
SetLinearForce
<float>
- Linear force (0 disables)
Enable
- Enable the trigger.
Disable
- Disable the trigger.
Toggle
- Toggle enable/disable.
Trigger:
TouchTest
(in all games since)
- Triggers either the OnTouching or OnNotTouching outputs for whether anything is touching this entity.
StartTouch
(in all games since) !FGD
- Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
EndTouch
(in all games since) !FGD
- Behave as if the !caller entity had just exited the trigger volume.
DisableAndEndTouch
(only in)
- Disables this trigger and calls EndTouch on all currently-touching entities.
TriggerOnce:
Toggle
- Toggles this trigger between enabled and disabled states.
EnableDisable:
Enable
Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Base:
Kill
- Removes this entity and any entities parented to it from the world.
KillHierarchy
- Functions the same as
Kill
, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKill
. SetParent
<string>
- Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment
<string>
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset
<string>
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
AddOutput
<string>
- Evaluates a keyvalue/output on this entity.
Format:<key> <value>
Format:<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1
toFireUser4
- Fire the
OnUser
outputs; see User Inputs and Outputs. Use
!FGD- Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs. DispatchEffect
<string>
(removed in) !FGD
- Dispatches a special effect from the entity's origin. Removed and replaced entirely by the particle system since
.
DispatchResponse
<string>
!FGD- Dispatches a response to the entity. See Response and Concept.
AddContext
<string>
- Adds to the entity's list of response contexts. Format is
<key>:<value>
. RemoveContext
<string>
- Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext
<string>
- Removes all contexts from this entity's list.
RunScriptFile
<script>
(in all games since)
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode
<string>
(in all games since)
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In
, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction
<string>
(in all games since) !FGD
- Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin
<coordinates>
(in all games since) !FGD
- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles
<angles>
(in all games since) !FGD
- Set this entity's angles.
Outputs
Trigger:
OnEndTouch
- Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire. (activator is the exiting entity)

OnEndTouchAll
- Fires when the last entity in the entity's area exits this trigger or when this entity is disabled. Only entities that passed this trigger's filters are considered. (activator is the last exiting entity)
OnTouching
(in all games since)
OnNotTouching
(in all games since)
- Fired when the
TouchTest
input is called.
TriggerOnce:
OnStartTouch
- Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire. (activator is the toucher)
OnTrigger
- Fired whenever the trigger is activated. (activator is the activator)
Base:
OnUser1
toOnUser4
- These outputs each fire in response to the firing of the like-numbered
FireUser1
toFireUser4
Input; see User Inputs and Outputs. OnKilled
(only in)
- This output fires when the entity is killed and removed from the game.