AddHavokBallAndSocketConstraint - Game

Revision as of 14:54, 11 November 2011 by imported>Scornett (Reverted edits by Scornett-Bot (talk) to last revision by Jlundin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Game Script

Adds a constraint between two rigid bodies of two references

Syntax

bool Function AddHavokBallAndSocketConstraint(ObjectReference arRefA, string arRefANode, ObjectReference arRefB, string arRefBNode, \
    float afRefALocalOffsetX = 0.0, float afRefALocalOffsetY = 0.0, float afRefALocalOffsetZ = 0.0, float afRefBLocalOffsetX = 0.0, \
    float afRefBLocalOffsetY = 0.0, float afRefBLocalOffsetZ = 0.0) native global

Parameters

  • arRefA: The first reference
  • arRefANode: The rigid body name on the first reference for the constraint
  • arRefB: The second reference
  • arRefBNode: The rigid body name on the second reference for the constraint
  • afRefALocalOffsetX: The offset of the constraint in the first body's space, X
    • Default: 0.0
  • afRefALocalOffsetY: The offset of the constraint in the first body's space, Y
    • Default: 0.0
  • afRefALocalOffsetZ: The offset of the constraint in the first body's space, Z
    • Default: 0.0
  • afRefBLocalOffsetX: The offset of the constraint in the second body's space, X
    • Default: 0.0
  • afRefBLocalOffsetY: The offset of the constraint in the second body's space, Y
    • Default: 0.0
  • afRefBLocalOffsetZ: The offset of the constraint in the second body's space, Z
    • Default: 0.0

Return Value

True on success.

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)

See Also