Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 25, 2007 5:04 pm 
Offline

Joined: Fri May 25, 2007 4:55 pm
Posts: 1
I know this is a very noob question, but I had a look all over the forum and didn¡t find the answer.

I have a build a closed "room" out of static boxes (collisioObject with mass=0) and spawned a ball inside it. When I apply forces to the ball they behave as expected, it collides with my room's walls fine.

So far so good, now I'm trying to add another static object (mass=0), a box that I want to move with the gamepad directly, and causes the ball to collide with it.

Can I apply new positions to that box directly? I'm trying to set the world matrix on the motion state, but that didn't worked.

What is the right way to reposition an static object?

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 25, 2007 5:38 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3744
Location: California, USA
Please check 'kinematic' objects by enabling 'USE_KINEMATIC_GROUND' define in Bullet/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp or search kinematic in the forums.

Alternatively, you can also use a constraint (similar to picking in Bullet/Demos/OpenGL/DemoApplication.cpp). That gives better 2-way interaction.

Hope this helps,
Erwin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group