Phys slideconstraint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (cleanup tag)
(cleaned up)
Line 1: Line 1:
{{cleanup}}
{{wrongtitle|title=phys_slideconstraint}}
 
phys_slideconstraint


==Entity Description==
A constraint that constrains an entity along a line segment.
A constraint that constrains an entity along a line segment.


KEYS
==Keyvalues==
 
*{{kv targetname}}
Name targetname <target_source> The name that other entities refer to this entity by.
*{{kv TwoObjectPhysics}}
 
*'''slideaxis'''
spawnflags spawnflags <flags>
:<[[vecline]]> Can be set with the Hammer helper tool.
 
*'''slidefriction'''
Entity 1 attach1 <target_destination>
:<float> Resistance/friction in the constraint
 
*'''SystemLoadScale'''
Entity 2 attach2 <target_destination>  
:<float> Scale of the mass load connected to this constraint (1=just the objects directly connected)
 
Constraint System Manager constraintsystem <target_destination> The name of a phys_constraintsystem that this constraint should be a part of. All constraints on a set of entities should be placed in the same system, or they will fight each other during simulation.
 
Force Limit to Break (lbs) forcelimit <float> The amount of force 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.
 
Torque Limit to Break (lbs * distance) torquelimit <float> The amount of torque 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.
 
Sliding Axis slideaxis <vecline>
 
Friction slidefriction <float> Resistance/friction in the constraint
 
Load Scale SystemLoadScale <float> Scale of the mass load connected to this constraint (1=just the objects directly connected)
 
 
INPUTS
 
Kill Removes this entity from the world.
 
KillHierarchy Removes this entity and all its children from the world.
 
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
Break Force the constraint to break.
 
TurnOn 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 Disable this constraint.
 
SetVelocity <float> Set linear velocity along the constraint
 
 
OUTPUTS
 
OnUser1 Fired in response to FireUser1 input.


OnUser2 Fired in response to FireUser2 input.
==Flags==
*{{fl TwoObjectPhysics}}
*2 : Limit Endpoints
*{{fl TwoObjectPhysics2}}


OnUser3 Fired in response to FireUser3 input.
==Inputs==
*{{i targetname}}
*{{i TwoObjectPhysics}}
*'''SetVelocity <float>'''
:Set linear velocity along the constraint


OnUser4 Fired in response to FireUser4 input.
==Outputs==
*{{o targetname}}
*{{o TwoObjectPhysics}}


OnBreak Fired when the constraint breaks.
[[Category:Entities]]

Revision as of 18:38, 5 October 2005

Template:Wrongtitle

Entity Description

A constraint that constrains an entity along a line segment.

Keyvalues

<vecline> Can be set with the Hammer helper tool.
  • slidefriction
<float> Resistance/friction in the constraint
  • SystemLoadScale
<float> Scale of the mass load connected to this constraint (1=just the objects directly connected)

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]

Inputs

Break
Force the constraint to break.
TurnOn
Enable the constraint; do this if the constrained objects don't exist when it spawns. Note that broken constraints cannot be turned back on as they have been deleted.
TurnOff
Disable the constraint.
  • SetVelocity <float>
Set linear velocity along the constraint

Outputs

OnBreak
Fired when the constraint breaks.