Phys pulleyconstraint: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Rephrased things and templated the keyvalues.) |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
A constraint that is essentially two length constraints and two points. Imagine it as a virtual rope connected to two objects, each suspended from a pulley above them.The constraint keeps the sum of the distances between the pulley points and their suspended objects constant. | 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== | ==Keyvalues== | ||
*{{kv | * {{kv twoobjectphysics}} | ||
*'''addlength''' <float> | *'''addlength''' <float> | ||
:Add (or subtract) this amount to the rest length of the pulley rope. | :Add (or subtract) this amount to the rest length of the pulley rope. | ||
Line 21: | Line 15: | ||
:Add (or subtract) this amount to the rest length of the pulley rope. | :Add (or subtract) this amount to the rest length of the pulley rope. | ||
*'''position2''' <vecline> | *'''position2''' <vecline> | ||
:The position of the pulley for Entity 2 | :Pulley Position 2 - The position of the pulley for ''Entity 2''. This point can be set by using the Helper Tool. | ||
==Inputs== | ==Inputs== |
Revision as of 20:15, 24 March 2006
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
- Template:Kv twoobjectphysics
- addlength <float>
- 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.
Inputs
- Template:I targetname
- 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
- Template:O targetname
- OnBreak
- Fired when the constraint breaks.