boolfunctionAddHavokBallAndSocketConstraint(ObjectReferencearRefA, stringarRefANode, ObjectReferencearRefB, stringarRefBNode, floatafRefALocalOffsetX=0.0, floatafRefALocalOffsetY=0.0, floatafRefALocalOffsetZ=0.0, floatafRefBLocalOffsetX=0.0, floatafRefBLocalOffsetY=0.0, floatafRefBLocalOffsetZ=0.0)NativeGlobal
Description
Wiki Description
Adds a constraint between two rigid bodies of two references
Documentation Comment
Adds a ball-and-socket constraint between two rigid bodies, identified by their ref and node names
Caveats
CK Wiki - Notes
- The nodes referenced must contain a bhkCollisionObject node, which in turn must contain a bhkRigidBody node.
- You can only add a ball and socket constraint on dead actors, or live actors that are in the process of "ragdolling" from ObjectReference.PushActorAway(...) or some other physics impact. When the live actor gets back up, the constraint will be broken.
Parameters
stringarRefANode
CK Wiki Description
The rigid body name on the first reference for the constraint
stringarRefBNode
CK Wiki Description
The rigid body name on the second reference for the constraint
floatafRefALocalOffsetX=0.0
CK Wiki Description
The offset of the constraint in the first body's space, X
floatafRefALocalOffsetY=0.0
CK Wiki Description
The offset of the constraint in the first body's space, Y
floatafRefALocalOffsetZ=0.0
CK Wiki Description
The offset of the constraint in the first body's space, Z
floatafRefBLocalOffsetX=0.0
CK Wiki Description
The offset of the constraint in the second body's space, X
floatafRefBLocalOffsetY=0.0
CK Wiki Description
The offset of the constraint in the second body's space, Y
floatafRefBLocalOffsetZ=0.0
CK Wiki Description
The offset of the constraint in the second body's space, Z
Examples
; Add a ball and socket constraint between bob and sally's hand nodes
Game.AddHavokBallAndSocketConstraint(Bob, "Hand", Sally, "Hand"); Add a ball and socket constraint between bob and sally's hand nodes with an offset of 1,1,1 in the first body's space
Game.AddHavokBallAndSocketConstraint(Bob, "Hand", Sally, "Hand", 1.0, 1.0, 1.0)Auto-Generated Example
ObjectReference myObjectReference__arRefA
string myString__arRefANode
ObjectReference myObjectReference__arRefB
string myString__arRefBNode
float myFloat__afRefALocalOffsetX
float myFloat__afRefALocalOffsetY
float myFloat__afRefALocalOffsetZ
float myFloat__afRefBLocalOffsetX
float myFloat__afRefBLocalOffsetY
float myFloat__afRefBLocalOffsetZ
bool returnedValue = Game.AddHavokBallAndSocketConstraint(myObjectReference__arRefA, myString__arRefANode, myObjectReference__arRefB, myString__arRefBNode, myFloat__afRefALocalOffsetX, myFloat__afRefALocalOffsetY, myFloat__afRefALocalOffsetZ, myFloat__afRefBLocalOffsetX, myFloat__afRefBLocalOffsetY, myFloat__afRefBLocalOffsetZ)