I have a bunch of kinematic actors which I move (using moveGlobalPose) every frame according to input form my animation system,
I want to be able detect when they collide.
I use a ActorGroups but don't get any callback for this collisions. On the other hand I de get the callbacks for dynamic/dynamic collisions and for dynamic/kinematic collisions.
What should I do in order to get report about kinematic/kinematic collisions?
(I also tried using UserContactReport directly but got the same result)
betajaen
05-05-2008 09:32:58
Kinematics that move into contact with statics or with other kinematics will not generate contact reports.
It's not supported by the PhysX SDK. If you HAVE to get a list of kinematic actors, you could use an intersection surrounding the kinematic actor with a generous skin width. But it won't be totally accurate.
Thank you for your fast reply, may be there is another way to do what I want?
I want to add physics capabilities to our game engine. As first stage I thought about rewriting the current collision detection mechanism using NxOgre and PhysX and later on adding more physics capabilities .
I need to have collision objects attached to Ogre nodes or bones and detect collision between those objects. Those node are moved by animations.
In the first stage I don't care about the physics but I want to be able to change those collision object to kinematic (maybe ther is a way to use dynamic actors of some sort?) and let them interact with dynamic objects in the world.
Is there a way to do such a thing?
betajaen
05-05-2008 09:50:20
You could use normal actors. No gravity with high damping. But you would have to calculate the exact force and torque involved to move those bone actors into the correct position. It's quite hard to setup properly, I've never done it, and I don't think anyone using NxOgre has either. It has been done before though - I've seen videos.
Kinematic Actors are a fallback, but a better choice. I'm just curious what do you want to do with the callback once you have it? Perhaps there is another way.
I need this as a part of a script based game engine, When a collision occur all I do is pass a callback to the script writer. It usually used to start/stop animations and sounds or changed states in the game state machine.
I want to switch over to PhysX in order to add dynamic objects to games (falling rocks, projectiles etc.). But I hoped the collision detection system will be part of the physics engine. Can I achieve this some how?
Another thing, it sounds like interaction between dynamic and kinematic objects is problematic, is there some starting point or tips for such a project?