Calculating collision shape from a .obj model
Posted: Thu Nov 08, 2012 12:12 pm
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.
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.