- type
- class
- extends
- Constraint
WeldJoint constraining two bodies to be exactly locked together.
The equation for this constraint is:
This constraint is 3 dimensional.
Although this constraint is very stable, if you chain bodies together using this constraint, you should except to see a small amount of rotation about the anchor points so you should chose them accordingly.
The equation for this constraint is:
[ body2.localPointToWorld(anchor2) ] = [ body1.localPointToWorld(anchor1) ] [ body2.rotation ] [ body1.rotation + phase ]This constraint is equivalent to using a PivotJoint and AngleJoint together except that it is solved as a single constraint and thus will be more stable.
This constraint is 3 dimensional.
Although this constraint is very stable, if you chain bodies together using this constraint, you should except to see a small amount of rotation about the anchor points so you should chose them accordingly.
Constructor
function
new(body1:Null<nape.phys.Body>, body2:Null<nape.phys.Body>, anchor1:nape.geom.Vec2, anchor2:nape.geom.Vec2, phase:Float = 0)
Construct a new WeldJoint.
Instance Properties hide inherited show inherited
var active : Bool = true
inherited from nape.constraint.Constraint
var anchor1 : nape.geom.Vec2
var anchor2 : nape.geom.Vec2
var body1 : Null<nape.phys.Body>
var body2 : Null<nape.phys.Body>
var breakUnderError : Bool = false
inherited from nape.constraint.Constraint
var breakUnderForce : Bool = false
inherited from nape.constraint.Constraint
readonly var cbTypes : nape.callbacks.CbTypeList = [CbType.ANY_CONSTRAINT]
inherited from nape.constraint.Constraint
var compound : Null<nape.phys.Compound> = null
inherited from nape.constraint.Constraint
var damping : Float = 1
inherited from nape.constraint.Constraint
var debugDraw : Bool = true
inherited from nape.constraint.Constraint
var frequency : Float = 10
inherited from nape.constraint.Constraint
var ignore : Bool = false
inherited from nape.constraint.Constraint
readonly var isSleeping : Bool
inherited from nape.constraint.Constraint
var maxError : Float = infinity
inherited from nape.constraint.Constraint
var maxForce : Float = infinity
inherited from nape.constraint.Constraint
var removeOnBreak : Bool = true
inherited from nape.constraint.Constraint
var space : Null<nape.space.Space> = null
inherited from nape.constraint.Constraint
var stiff : Bool = true
inherited from nape.constraint.Constraint
readonly var userData : Dynamic<Dynamic> = {}
inherited from nape.constraint.Constraint
Instance Methods hide inherited show inherited
function bodyImpulse(body:nape.phys.Body):nape.geom.Vec3
overrides nape.constraint.Constraint
copy():Constraint
inherited from nape.constraint.Constraint
function impulse():nape.geom.MatMN
overrides nape.constraint.Constraint
function visitBodies(lambda:nape.phys.Body -> Void):Void
overrides nape.constraint.Constraint