Sign in to follow this  
Medo Mex

How to add a building into bullet physics world?

Recommended Posts

Medo Mex    891
I have made a complicated building in 3Ds Max and looking to load it into bullet physics, which collision shape should I be using to load the building mesh?

The mesh will be LPD3DXMESH.

Share this post


Link to post
Share on other sites
Krohm    5030
[url="http://btBvhTriangleMeshShape"]btBvhTriangleMeshShape[/url]. But I recommend building a set of simple hulls instead (it has been that way for ages and it appears to work faster for me).

Share this post


Link to post
Share on other sites
argeze    127
[quote name='Medo3337' timestamp='1353233850' post='5002002']
The terrain will not be moving, so it's mass is set to zero and I'm using one single terrain and trying to setup a building over it.
[/quote]

You terrain having 0 mass is a static object. So an object which do not move and allow other dynamic bodies to interact with.

If your building should also not move, then it should probably also be a static object, so a btRigidBody with also 0 mass. But you need to place that building yourself on a position in the world. So of course, depending where you place it, the terrain might intersect with it and this is perfectly fine. Static objects can intersect each other and won't affect the simulation.

Just make sure you do not place dynamic objects at initial position that intersect with static ones.

SO just build the shape of the building with simple shape for starting like the btBoxShape, then set the mass to 0 and create a btRigidBody with it.
Add it to the world at the position you want the building to be in the world and you are set. Edited by argeze

Share this post


Link to post
Share on other sites
Medo Mex    891
@xexuxjy: Should the whole building be one single mesh even if the building is more than one floor (including the ladder)?

If I have 3-4 floors building for example, there will be a marble ladder like in the following photo:
[img]http://us.123rf.com/400wm/400/400/demian1975/demian19750907/demian1975090700168/5228959-petrozavodsk-internal-interiors-of-musical-theatre-a-marble-ladder.jpg [/img]


How do I make the characters be able to move over the marble ladder?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this