Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 15 Jan 2013
Offline Last Active May 11 2013 11:45 PM

Posts I've Made

In Topic: [physx3.2.2 question]collision problem related to triangle mesh object

16 January 2013 - 01:16 AM

From the documentation (Shapes and Geometries -> Triangle Meshes):

"Shapes with triangle mesh geometries may only be created for static and kinematic actors"


You can't have a dynamic (moving) object that uses a triangle mesh for collisions, it's not supported.

biggrin.png thank you!!   I add  " actor->setRigidDynamicFlag(PxRigidDynamicFlag::eKINEMATIC,true); " to change the triangle dynamic actor to  kinematic actor, I use boxgeometry create a set of cubes and those are the dynamic actors. Then use them to hit kinematic actor--triangle mesh cube. The kinematic actor cube can  intercept dynamic actor cubes, it seems that the collision detection happened, but now a new problem appeared, the kinematic actor cube can not fall down, it just hang on the air even though I have set the kinematic target and linear velocity. So what's the problem here?

In Topic: [physx3.2.2 question]collision problem related to triangle mesh object

15 January 2013 - 11:28 PM

How do you create your plane?

TriangleMesh <--> TriangleMesh collision is very complex therefore usually not implemented or not enabled by default.


For cube you should use PxBoxGeometry or something similar.

here is code that create the plane:


//1) Create ground plane
    PxReal d = 0.0f;  
PxTransform pose = PxTransform(PxVec3(0.0f, 0.0f, 0.0f),PxQuat(PxHalfPi, PxVec3(0.0f, 0.0f, 1.0f)));
PxRigidStatic* plane = gPhysicsSDK->createRigidStatic(pose);
if (!plane)
cerr<<"create plane failed!"<<endl;
PxShape* shape = plane->createShape(PxPlaneGeometry(), *mMaterial);
if (!shape)
cerr<<"create shape failed!"<<endl;
I want to be familiar with PxTriangleMeshGeometry function so I use it to create a cube