How to remove inertia?

Buckcherry

19-10-2006 15:36:09

Hello everybody,

I am currently using OgreNewt and I would like to know how to set the inertia to 0. So, when two bodies are collisioning, they just stop moving.

Setting the mass of the body to 0 there is not inertia, but it that way I can not use the setVelocity.

Any idea?

Buckcherry

22-10-2006 10:48:05

How do you create a body for a building without inertia?. In another case, when a player touch the building, the building moves!.

Help, please!.

josedagardner

23-10-2006 10:42:32

Set the mass of the building to 0?

Buckcherry

23-10-2006 18:55:45

Yes, setting the mass to 0 I will not have inertia.

But i want to do the same for enemies and objects. The problem is that if I set the mass of an enemy to 0 I can not use setVelocity to move it (it does not move).

Any idea?.

Buckcherry

26-10-2006 20:46:41

C'mon!, nobody knows how to do it?.

I am getting crazy trying to solve the problem...

HexiDave

27-10-2006 02:31:55

Why don't you just build TreeCollision data from the building? TreeCollisions don't move unless you move them and don't collide with terrain TreeCollision data (or other buildings.)

Buckcherry

28-10-2006 18:53:56

That's a good idea!.

I didn't know that behaviour in the tree collision...

Is there any place where it was explained, such as Wiki Tutorial?.

HexiDave

28-10-2006 23:05:18

Well, I know you can pass a SceneNode to a TreeCollision on creation, so look in the documentation. If you're having trouble with the code, you can glean code from the PLSM2 / OgreNewt integration, which there are about 40 million posts about in the OgreNewt and PLSM2 forums. Those use index and vertex data directly, but you can instead pass a SceneNode with your object(s) and it should work.