Entity:SetPhysConstraintObjects
Description
When called on a constraint entity, sets the two physics objects to be constrained.
Usage is not recommended as the Constraint library provides easier ways to deal with constraints.
Arguments
Example
From constraint.lua
Constraint = ents.Create("phys_lengthconstraint")
Constraint:SetPos( WPos1 )
Constraint:SetKeyValue( "attachpoint", tostring(WPos2) )
Constraint:SetKeyValue( "minlength", "0.0" )
Constraint:SetKeyValue( "length", length + addlength )
if ( forcelimit ) then Constraint:SetKeyValue( "forcelimit", forcelimit ) end
if ( rigid ) then Constraint:SetKeyValue( "spawnflags", 2 ) end
Constraint:SetPhysConstraintObjects( Phys1, Phys2 )
Constraint:Spawn()
Constraint:Activate()