Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualrocklobster

Posted 17 December 2012 - 01:09 AM

You could try storing the rigid body in the user pointer.

collisionObject->setUserPointer((void*)rigidBody);

// then when you ray cast you can get the user pointer from the collision object
btRigidBody* body = (btRigidBody*)rayHitObject->getUserPointer();

EDIT: Sorry but I've only used it in c++ so I don't know about the java port

#3rocklobster

Posted 17 December 2012 - 01:08 AM

You could try storing the rigid body in the user pointer.

collisionObject->setUserPointer((void*)rigidBody);

// then when you ray cast you can get the user pointer from the collision object
btRigidBody* body = (btRigidBody*)rayHitObject->getUserPointer();

#2rocklobster

Posted 17 December 2012 - 01:05 AM

You could try storing the rigid body in the user pointer.

collisionObject->setUserPointer((void*)rigidBody);
// then when you ray cast you can get the user pointer from the collision object

btRigidBody* body = (btRigidBody*)rayHitObject->getUserPointer();

#1rocklobster

Posted 17 December 2012 - 01:01 AM

You could try storing the rigid body in the user pointer.

PARTNERS