phys_lengthconstraint
- Counter-Strike 2
- Half-Life: Alyx
- Dota 2
- Steam VR
Point Entity
A constraint that preserves the distance between two entities. If the 'Keep Rigid' flag is set, think of it as a rod. If not, think off it as a virtual rope.
Keyvalues
-
Entity Scripts (
vscripts) <ScriptList>
Name(s) of script files that are executed after all entities have spawned. -
Name (
targetname) <TargetSource>
The name that other entities refer to this entity by. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Start inactive (
4) - Do not connect entities until turned on (
16)
- No Collision until break (
-
Entity 1 (
attach1) <TargetDestination> -
Entity 2 (
attach2) <TargetDestination> -
Entity 1 Attachment Name (
attachment1) <String>
If set, we'll attach to the body / location corresponding to this attachment. -
Entity 2 Attachment Name (
attachment2) <String>
If set, we'll attach to the body / location corresponding to this attachment. -
Impulse Limit to Break (kg) (
forcelimit) <Float>
The amount of impulse an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects. -
Angular Impulse Limit to Break (kg * distance) (
torquelimit) <Float>
The amount of angular impulse required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint. -
Play Sound on Break (
breaksound) <Sound>
A sound played when the constraint is broken. -
Follow teleport distance (
teleportfollowdistance) <Float>
If one object teleports more than this many units away it will cause the other constrained object to teleport to an appropriate relative position. -
Treat Entity 1 As Infinite Mass (
treat_entity1_as_infinite_mass) <Boolean>
If true, the joint will not affect the motion of Entity 1. Entity 2 will just follow Entity 1. -
Additional Length (
addlength) <Float>
Add (or subtract) this amount to the rest length of the rope. -
Minimum Length (
minlength) <Float>
If the constraint is not rigid, this is the minimum length it can be. -
Attached object 2 point (
attachpoint) <Vecline>
The position the rope attaches to object 2 -
Enable Collision (
enablecollision) <Boolean>
Constraints disable collision between the attached entities. In some rare cases we want to enable this collision. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Keep Rigid (
2)
- No Collision until break (
Inputs
-
RunScriptFile <
String>
Load and execute a script file -
RunScriptCode <
String>
Execute a fragment of script code -
CallScriptFunction <
String>
Call a script function -
CallPrivateScriptFunction <
String>
Calls a script function from this entity's private script scope. -
CallGlobalScriptFunction <
String>
Calls a script function in the global script scope. -
Kill <
Void>
Removes this entity from the world. -
KillHierarchy <
Void>
Removes this entity and all its children from the world. -
KillConstrained <
Void>
Removes this entity, all its children, and anything constrained to it, from the world. -
AddOutput <
String>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void>
Causes this entity's OnUser4 output to be fired. -
Break <
Void>
Force the constraint to break. -
TurnOn <
Void>
Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted. -
TurnOff <
Void>
Disable this constraint.
Outputs
-
OnUser1 <
Void>
Fired in response to FireUser1 input. -
OnUser2 <
Void>
Fired in response to FireUser2 input. -
OnUser3 <
Void>
Fired in response to FireUser3 input. -
OnUser4 <
Void>
Fired in response to FireUser4 input. -
OnKilled <
Void>
Fired when the entity is killed and removed from the game. Parameter is the inflictor. -
OnBreak <
Void>
Fired when the constraint breaks.
Point Entity
A constraint that preserves the distance between two entities. If the 'Keep Rigid' flag is set, think of it as a rod. If not, think off it as a virtual rope.
Keyvalues
-
Entity Scripts (
vscripts) <ScriptList>
Name(s) of script files that are executed after all entities have spawned. -
Name (
targetname) <TargetSource>
The name that other entities refer to this entity by. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Start inactive (
4) - Change mass to keep stable attachment to world (
8) - Do not connect entities until turned on (
16)
- No Collision until break (
-
Entity 1 (
attach1) <TargetDestination> -
Entity 2 (
attach2) <TargetDestination> -
Impulse Limit to Break (kg) (
forcelimit) <Float>
The amount of impulse an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects. -
Angular Impulse Limit to Break (kg * distance) (
torquelimit) <Float>
The amount of angular impulse required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint. -
Play Sound on Break (
breaksound) <Sound>
A sound played when the constraint is broken. -
Follow teleport distance (
teleportfollowdistance) <Float>
If one object teleports more than this many units away it will cause the other constrained object to teleport to an appropriate relative position. -
Additional Length (
addlength) <Float>
Add (or subtract) this amount to the rest length of the rope. -
Minimum Length (
minlength) <Float>
If the constraint is not rigid, this is the minimum length it can be. -
Attached object 2 point (
attachpoint) <Vecline> -
Enable Collision (
enablecollision) <Boolean>
Constraints disable collision between the attached entities. In some rare cases we want to enable this collision. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Keep Rigid (
2)
- No Collision until break (
Inputs
-
RunScriptFile <
String>
Load and execute a script file -
RunScriptCode <
String>
Execute a fragment of script code -
CallScriptFunction <
String>
Call a script function -
CallPrivateScriptFunction <
String>
Calls a script function from this entity's private script scope. -
CallGlobalScriptFunction <
String>
Calls a script function in the global script scope. -
Kill <
Void>
Removes this entity from the world. -
KillHierarchy <
Void>
Removes this entity and all its children from the world. -
AddOutput <
String>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void>
Causes this entity's OnUser4 output to be fired. -
Break <
Void>
Force the constraint to break. -
TurnOn <
Void>
Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted. -
TurnOff <
Void>
Disable this constraint.
Outputs
-
OnUser1 <
Void>
Fired in response to FireUser1 input. -
OnUser2 <
Void>
Fired in response to FireUser2 input. -
OnUser3 <
Void>
Fired in response to FireUser3 input. -
OnUser4 <
Void>
Fired in response to FireUser4 input. -
OnKilled <
Void>
Fired when the entity is killed and removed from the game. -
OnBreak <
Void>
Fired when the constraint breaks.
Point Entity
A constraint that preserves the distance between two entities. If the 'Keep Rigid' flag is set, think of it as a rod. If not, think off it as a virtual rope.
Keyvalues
-
Entity Scripts (
vscripts) <ScriptList>
Name(s) of script files that are executed after all entities have spawned. -
Name (
targetname) <TargetSource>
The name that other entities refer to this entity by. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Start inactive (
4) - Do not connect entities until turned on (
16)
- No Collision until break (
-
Entity 1 (
attach1) <TargetDestination> -
Entity 2 (
attach2) <TargetDestination> -
Entity 1 Attachment Name (
attachment1) <String>
If set, we'll attach to the body / location corresponding to this attachment. -
Entity 2 Attachment Name (
attachment2) <String>
If set, we'll attach to the body / location corresponding to this attachment. -
Impulse Limit to Break (kg) (
forcelimit) <Float>
The amount of impulse an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects. -
Angular Impulse Limit to Break (kg * distance) (
torquelimit) <Float>
The amount of angular impulse required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint. -
Play Sound on Break (
breaksound) <Sound>
A sound played when the constraint is broken. -
Follow teleport distance (
teleportfollowdistance) <Float>
If one object teleports more than this many units away it will cause the other constrained object to teleport to an appropriate relative position. -
Treat Entity 1 As Infinite Mass (
treat_entity1_as_infinite_mass) <Boolean>
If true, the joint will not affect the motion of Entity 1. Entity 2 will just follow Entity 1. -
Additional Length (
addlength) <Float>
Add (or subtract) this amount to the rest length of the rope. -
Minimum Length (
minlength) <Float>
If the constraint is not rigid, this is the minimum length it can be. -
Attached object 2 point (
attachpoint) <Vecline>
The position the rope attaches to object 2 -
Enable Collision (
enablecollision) <Boolean>
Constraints disable collision between the attached entities. In some rare cases we want to enable this collision. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Keep Rigid (
2)
- No Collision until break (
Inputs
-
RunScriptFile <
String>
Load and execute a script file -
RunScriptCode <
String>
Execute a fragment of script code -
CallScriptFunction <
String>
Call a script function -
CallPrivateScriptFunction <
String>
Calls a script function from this entity's private script scope. -
CallGlobalScriptFunction <
String>
Calls a script function in the global script scope. -
Kill <
Void>
Removes this entity from the world. -
KillHierarchy <
Void>
Removes this entity and all its children from the world. -
KillConstrained <
Void>
Removes this entity, all its children, and anything constrained to it, from the world. -
AddOutput <
String>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void>
Causes this entity's OnUser4 output to be fired. -
Break <
Void>
Force the constraint to break. -
TurnOn <
Void>
Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted. -
TurnOff <
Void>
Disable this constraint.
Outputs
-
OnUser1 <
Void>
Fired in response to FireUser1 input. -
OnUser2 <
Void>
Fired in response to FireUser2 input. -
OnUser3 <
Void>
Fired in response to FireUser3 input. -
OnUser4 <
Void>
Fired in response to FireUser4 input. -
OnKilled <
Void>
Fired when the entity is killed and removed from the game. Parameter is the inflictor. -
OnBreak <
Void>
Fired when the constraint breaks.
Point Entity
A constraint that preserves the distance between two entities. If the 'Keep Rigid' flag is set, think of it as a rod. If not, think off it as a virtual rope.
Keyvalues
-
Entity Scripts (
vscripts) <ScriptList>
Name(s) of script files that are executed after all entities have spawned. -
Name (
targetname) <TargetSource>
The name that other entities refer to this entity by. -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Start inactive (
4) - Change mass to keep stable attachment to world (
8) - Do not connect entities until turned on (
16)
- No Collision until break (
-
Entity 1 (
attach1) <TargetDestination> -
Entity 2 (
attach2) <TargetDestination> -
Impulse Limit to Break (kg) (
forcelimit) <Float>
The amount of impulse an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects. -
Angular Impulse Limit to Break (kg * distance) (
torquelimit) <Float>
The amount of angular impulse required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint. -
Play Sound on Break (
breaksound) <Sound>
A sound played when the constraint is broken. -
Follow teleport distance (
teleportfollowdistance) <Float>
If one object teleports more than this many units away it will cause the other constrained object to teleport to an appropriate relative position. -
Additional Length (
addlength) <Float>
Add (or subtract) this amount to the rest length of the rope. -
Minimum Length (
minlength) <Float>
If the constraint is not rigid, this is the minimum length it can be. -
Attached object 2 point (
attachpoint) <Vecline> -
Spawnflags (
spawnflags) <Flags>- No Collision until break (
1) - Keep Rigid (
2)
- No Collision until break (
Inputs
-
RunScriptFile <
String>
Load and execute a script file -
RunScriptCode <
String>
Execute a fragment of script code -
CallScriptFunction <
String>
Call a script function -
CallPrivateScriptFunction <
String>
Calls a script function from this entity's private script scope. -
CallGlobalScriptFunction <
String>
Calls a script function in the global script scope. -
Kill <
Void>
Removes this entity from the world. -
KillHierarchy <
Void>
Removes this entity and all its children from the world. -
AddOutput <
String>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void>
Causes this entity's OnUser4 output to be fired. -
Break <
Void>
Force the constraint to break. -
TurnOn <
Void>
Enable the constraint. Do this when the objects don't exist when the constraint spawns - or when you have deactivated the constraint. Broken constraints can NOT be turned on. They have been deleted. -
TurnOff <
Void>
Disable this constraint.
Outputs
-
OnUser1 <
Void>
Fired in response to FireUser1 input. -
OnUser2 <
Void>
Fired in response to FireUser2 input. -
OnUser3 <
Void>
Fired in response to FireUser3 input. -
OnUser4 <
Void>
Fired in response to FireUser4 input. -
OnKilled <
Void>
Fired when the entity is killed and removed from the game. -
OnBreak <
Void>
Fired when the constraint breaks.