Jump to content
  • Advertisement
Sign in to follow this  
Medo Mex

Setting up physics for different models

This topic is 1934 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

Which shapes are appropriate to use for setting up physics for different kinds of meshes?

 

Such as:

- Building

- Tank

- Airstrike/Helicopter

- Character

 

I thought about using btConvexHullShape for buildings, not sure if that's a good idea, but I need some advise related to setting up physics shapes.

Share this post


Link to post
Share on other sites
Advertisement

I need alittle bit more of details.

 

- Can I use btConvexHullShape for buildings?

 

- What should I use for enemy character? Capsule?

 

- What shape is appropriate for tanks and airstrikes? (remember that the tank will be moving so I can NOT use a box shape also the airstrike could move on the terrain (e.g: taking off)

Share this post


Link to post
Share on other sites

btConvexHullShape is quite fast in my experience. Not as fast as the box but still very viable. Use it whatever you see fit.

Keep in mind that you probably don't really want to create an association between a resource type and a collision shape. Have the resource encode its own collision shape, pull it out the asset. Use a special texture, a node name, an annotation to figure out what set of vertices to use and how.

- What shape is appropriate for tanks and airstrikes? (remember that the tank will be moving so I can NOT use a box shape also the airstrike could move on the terrain (e.g: taking off)

Moving has no relation with collision shapes in Bullet. Collision shapes are "eternal" entities and does not really exist. They are instanced using btCollisionObject or btRigidBody. If you need to move a btRigidBody then you have to mark it kinematic. That said:
  • The tank would be a kinematic object, eventually with its own ghost object sensor.
  • The airstrike (or better, the airplanes bombing the place) are pretty much the same thing.
  • The explosions would probably be instant collision queries with spheres and won't even exist in the world.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!