userData error!!

hbd760112

28-02-2008 03:49:14


/* Create Cube */
NxOgre::Body* SPHERE01_BODY;
ActorParams aps;
aps.mMass = 33;
aps.mAngularVelocity = NxVec3(0,-10,0);
SPHERE01_BODY = phyScene->createBody("SPHERE01;Sphere01.mesh",new NxOgre::SphereShape(15),Vector3(0,230,0),aps);
SPHERE01_BODY->getNxActor()->userData = "123";

with userData set, there are two things happened:
1. the SPHERE01_BODY can not collide with other body
2. sometimes, ogre occurs error dialog.
Dose anyone know what is going worng? thanks for your help. :)

dbrock

28-02-2008 05:29:29

What is the reason for setting userdata?

hbd760112

28-02-2008 06:23:44

Actually, I try to use Nxogre to do Trigger callback,but fail.
Thus, I directly use a Ageia trigger callback.
I want to know which object touchs the trigger by judging userData

betajaen

28-02-2008 11:31:42

You don't touch the userData. It is required for NxOgre to know which NxActor/NxShape/NxJoint is which.

If you wish to know what Actor is from another; either compare names or pointers of the Actors.