Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualargeze

Posted 22 November 2012 - 03:30 PM

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.


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.

#1argeze

Posted 22 November 2012 - 03:25 PM

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.


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 object can intersect and won't affect the simulation.

Just make sure you do not place dynamic objects at initial position that intersect with dynamic 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 wan tthe building to be in the world et you are set.

PARTNERS