constraint.Elastic
Entity, Entity constraint.Elastic( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2, number constant, number damping, number relDamping, string material = "", number width, boolean stretchOnly = false, table color = color_white )
Description
Creates an elastic rope constraint.
Arguments
4 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls). Must be different from
bone1
.
8 number damping
How much energy the elastic loses. The larger the number, the less bouncy the elastic.
9 number relDamping
The amount of energy the elastic loses proportional to the relative velocity of the two objects the elastic is attached to.
Returns
1 Entity
The created constraint. (phys_spring) Will return
false
if the constraint could not be created.