[Bleeding] H.To Debug Shapes in they real form? [Solved]

almondega

03-09-2008 05:28:45

its me again -.-

1° question:
how can i debug the primitives in they real shapes?
all of i got are cubes

2° question:
u guys know in these fps games when a bullet fire a wall, the wall got a small hole (usually a 2d picture)

so, how can i do it in a static actor (a cube)
i know how to get the actor fired with a raycaster and the ray position
but i guess i need the triangle fired orientation to put the "damage entity" in the correct cube face

does anybody know how to do that?

tks :wink:

mcaden

03-09-2008 07:09:13

1 - remote debugger supplied with PhysX

2 - I believe this is part of ContactStream - you can call "getPoint()" to find where the collision is on the object. However, I'm not sure of this as I've only looked through the documentation a bit on it. Betajaen or somebody more experienced with this will have to confirm.

almondega

03-09-2008 21:37:31

1- i guess i have to install a nVidia addon for this
tks

2- I DID!!
u need to get the normal of the impact using the ray, like this
ray->getClosestRaycastHit().mRaycastHit.worldNormal
and then, set the direction of the node that represents the damage
Vector3 mVector;
mVector.x = ray->getClosestRaycastHit().mRaycastHit.worldNormal.x;
mVector.y = ray->getClosestRaycastHit().mRaycastHit.worldNormal.y;
mVector.z = ray->getClosestRaycastHit().mRaycastHit.worldNormal.z;
mBulletNode->setDirection(mVector,Node::TS_WORLD);


i had to do the vector3 that way because worldNormal only returns NxVec3

then it works =]

tks

reptor

04-09-2008 12:15:35

The Remote Debugger comes with the Nvidia PhysX SDK.

almondega

05-09-2008 01:27:33

wow
i didnt know about that
worked fine =]
tks