Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Phys constraint

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Contents

phys_constraint

Source(core) Point Entity


description

A constraint that keeps the relative position and orientation of two objects fixed.


properties

  • Entity 1 attach1(target_destination)
  • Entity 2 attach2(target_destination)
  • 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) - default: 0
    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) - default: 0
    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.


spawn flags

  • 1: No Collision until break - default: OFF
  • 4: Start inactive - default: OFF
  • 8: Change mass to keep stable attachment to world - default: OFF
  • 1: No Collision until break - default: ON


inputs

  • 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

  • OnBreak(void)
    Fired when the constraint breaks.


related tutorials

Submit your tutorial for phys_constraint

Personal tools