Objects with no dynamics and using two dynamics worlds

JohnnyM
Posts: 15
Joined: Tue Dec 23, 2008 11:51 pm

Objects with no dynamics and using two dynamics worlds

Post by JohnnyM »

How can I use bullet for pure collision detection but still have bullet resolve collisions for me. I've looked around the forum and I couldn't find an answer. The best I could think of was updating rigidbody positions and velocities manually each frame (To where I want the objects to be), and then if there are collisions, get the position after a physics update. This doesn't seem like a terribly efficient way of doing this though. :?

Also, is there any major problems with have two dynamics worlds simultaneously? The reason I want to have two is because in my game, I'm handling everything as if it were one long corridor (its in space), and then I'm bending most object positions around a spline (for rendering). The reason I say most is because I don't want debris from explosions and such to be handled this way. My first question ties into this because I will have all manually controlled objects in my corridor space, and all bullet controlled objects in world space.

Thanks
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Objects with no dynamics and using two dynamics worlds

Post by Erwin Coumans »

JohnnyM wrote:How can I use bullet for pure collision detection but still have bullet resolve collisions for me.
Can you explain more in detail what you need? Pure collision detection, and still resolving collisions sounds like a contradiction. How does it differ from using ordinary rigid body dynamics?
Also, is there any major problems with have two dynamics worlds simultaneously?
There should be no problems in running several dynamics worlds, although it is best to execute the 'stepSimulation' sequentially (not using threads running in parallel).

Hope this helps,
Erwin
JohnnyM
Posts: 15
Joined: Tue Dec 23, 2008 11:51 pm

Re: Objects with no dynamics and using two dynamics worlds

Post by JohnnyM »

Sorry, That is a bit of a contradiction... What I ment to ask was if there is a way to have rigid bodies that bullet does not move except in case of a collision, and what I mean by that is if I have two objects that I move manually, and they collide, I want Bullet to both detect the collision and separate the objects. Just occured to me that the character controller might be a good reference for me to look at.

I'm thinking now that maybe I should only set velocities manually (angular and linear), not position. Then I'll just let Bullet do the moving objects for me. Is bullet consistent enough that I shouldn't have any trouble get things to move how I want by doing this?