Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Nov 08, 2012 12:12 pm 
Offline

Joined: Thu Nov 08, 2012 12:05 pm
Posts: 1
Hi, I'm new to Bullet and need to ask about something..
I'm developing a 3D game where you play is a robot on wheels and your character is affected by physics continuously. So, if you are pushed, you fall over. If you roll into a wall, you'll bounce off. I think I have this part done - I'll just have a constant force pushing your character while the wheels are moving and touching the floor.

However, how would I get the collision shape for your character? The model is loaded from an .obj model file. I have access to every triangle. I'm completely new to physics, not sure how this stuff works. Would I just get the bounding box and use a cube collision box? What about other shapes your character might collide with too? How would I match the collision shape to the shape of the model?

Sorry if what I'm saying isn't very clear - I am rushing this post as I have to go in a second and would like an answer for when I get home. Thanks, Jishaxe.


Top
 Profile  
 
PostPosted: Sun Nov 11, 2012 6:28 am 
Offline

Joined: Sat Aug 18, 2012 2:20 am
Posts: 16
Location: Chennai, India
You can use convexHull shape which can directly take the vertex and index lists of your model and build a hull shape. This should be the easiest was to do it. However, if you are not looking into that much details, you can use compound shape. Compound shape is a bunch of shapes joined together.


Top
 Profile  
 
PostPosted: Tue Nov 13, 2012 8:27 am 
Offline

Joined: Fri Jun 24, 2011 8:53 am
Posts: 149
Without seeing the model it's hard to tell whatever a convex hull will be sufficient.
I'm fairly sure there's an obj->bullet serialization example in the 2.78 SDK (and probably in all others). It produces a polysoup so you're strongly encouraged in using a lower-detail LOD for the model.
Of course this takes for granted the model is somewhat monolithic in nature. If this isn't the case you'll have to model the various constraints.
Compound shapes are another possibility but I'm unsure about their use, I think I read somewhere they didn't work as expected on GPU-accelerated broadphase (but I guess that's an outdated statement now).


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 6 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