Phys constraint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{wrongtitle|title=phys_constraint}}
{{wrongtitle|title=phys_constraint}}
==Entity Description==
==Entity Description==
A constraint that keeps the relative position and orientation of two objects fixed.
A constraint that keeps the relative position and orientation of two objects fixed. Can be used for 'gluing' several physics props together.


==Keyvalues==
==Keyvalues==

Revision as of 07:58, 28 September 2005

Template:Wrongtitle

Entity Description

A constraint that keeps the relative position and orientation of two objects fixed. Can be used for 'gluing' several physics props together.

Keyvalues

One of the entities to constrain
  • attach2 <target_destination>
The other entity to constrain
  • 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.
  • forcelimit <float>
The amount of force an impact must apply to the constraint to break it. Measured in pounds. 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.
  • torquelimit <float>
The amount of torque required to break the constraint. Measured in pounds*distance (pounds*inches). 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.
  • breaksound <sound>
A sound played when the constraint is broken.

Flags

  • 1: No Collision until break
  • 2: not used
  • 4: Start inactive
  • 8: Change mass to keep stable attachment to world

Inputs

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.

Outputs

Fired when the constraint breaks.

See also