Home > Game Physics, Tutorials, game dev > Linear Joint in ageia physics

Linear Joint in ageia physics

April 6th, 2008

Similar to Angular Joints the way in which it is created, the only difference between them is that in Linear Joint the rest length is not restricted in movement but the angular rotation of the rigid body is.

Linear Joint in Ageia physics

The above diagram shows that the restlength is not restricted and the angle/orientation of the rigid body is restricted based on the angle provided.

CreateLinearJoint() method takes a constraint descriptor and a list with a vector and the orientation.

Creation of Linear joint also requires a constraint descriptor.

Example to create a Linear Joint:

    --Create linear Joint
    pDirPhyz = member("physX") --your physics member name
    POCA = vector(0,0,0) -- point of contact of rigidbody A
    -- point of contact of rigidbody B, offset from the center:vector(0,0,0)
    POCB = vector(60,0,0) 
    --read the help for constraint descriptor ConstraintDesc()
    desc = ConstraintDesc("linear_constraint",rb_A,rb_B,POCA,POCB,100,30)
    --Create a linearjoint maintaining an angle of 30 degree in y-axis
    linearjoint = pDirPhyz.createLinearJoint(desc,[vector(0,1,0), 30])
    put linearjoint --DEBUG

Note: While creating a constraint descriptor in the above example code, rb_B will get oriented at an angle of 30 degree wrt to rb_A in y-axis.

Buy us a coffee mug !

Table of contents for Joints in Director Ageia Physics

  1. Constraint descriptor
  2. Linear Joint in ageia physics
  3. Angular Joint in Director Ageia Physics
  4. Spring constraint in Ageia Physics
  • Share/Save/Bookmark

  1. No comments yet.
  1. No trackbacks yet.