Phys pulleyconstraint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
m (Robot: fixing template case.)
Line 27: Line 27:


==Inputs==
==Inputs==
*{{i targetname}}
*{{I Targetname}}
*'''Break'''
*'''Break'''
:Force the constraint to break.
:Force the constraint to break.

Revision as of 19:36, 19 January 2009

Template:Wrongtitle Template:Base point

Description

A constraint that is essentially two length constraints and two points. Imagine it as a virtual rope connected to two pulleyed objects, specified in the Entity 1 (attach1) and Entity 2 (attach2) keyvalues, each suspended from a pulley above them.

Pulley point 1 - the pulley from which Entity 1 is always suspended from - is the origin of this constraint entity.

Pulley point 2 - the pulley from which Entity 2 is always suspended from - is the position of the "blue ball", set by altering the Pulley Position 2 (position2) keyvalue directly, or by using the Helper Tool.

The constraint keeps the sum of the distances between the pulley points and their suspended objects constant.

Keyvalues

Add (or subtract) this amount to the rest length of the pulley rope.
  • gearratio <float>
Add (or subtract) this amount to the rest length of the pulley rope.
  • position2 <vecline>
Pulley Position 2 - The position of the pulley for Entity 2. This point can be set by using the Helper Tool.

Flags

Inputs

  • 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.

Outputs

Fired when the constraint breaks.