Jump to content
  • Advertisement
Sign in to follow this  
shiufai

Disabling Kinematic Object Collisions in PhysX

This topic is 3455 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am trying to use PhysX to develop a small demo of objects bouncing within a interactive/moving cube. Here is how I have been hacking it through: I am creating each wall of the cube as individual kinematic objects and place dynamic objects (i.e. spheres, cubes) within the space limited by the walls. The user can then move/rotate the cube around to see the objects movement within it. Here is what I am stuck on: I am using box controller for each wall. Whenever a user move the cube as a whole, I go through the list of controllers to move and rotate each wall. Problem is the walls collide with one another and pushing themselves out of position from the original cube space. My question: How do I set it in PhysX so that there won't be collisions between kinematic objects (i.e. the character controllers)? Thanks so much! Bill

Share this post


Link to post
Share on other sites
Advertisement
Hi. So you need to disable contacts between your character controllers which form a box?

1. Bad idea. As character controller supports stuff you dont use. Collide and Slide and what not. This is what is causing your walls to push apart. Use a single kinematic rigid body with 6 NxShapes (boxes) forming the 'walls, roof and floor' - You cant use a single box as you want collision on the back face...

2. Now (this applies to both our methods) Enable contact reporting on your NxScene. So now you can actually do something with the contacts generated.

3. Now set up collision groups for the actors/shapes. see NxScene::setGroupCollisionFlag(). Add your actors to a group, and disable collision with that group versus itself -- NxScene::setGroupCollisionFlag(WALL, WALL, false);

4. Dont use character controllers for this. See #1.

5. Really. See #4.

6. True kinematic objects don't collide with each other. The character controller has a whole bunch of special code that causes push outs.

Good luck.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!