bouncyness etc.

Fred

26-12-2007 22:08:24

Hi,

I've a little problem with OgreOde. I created a collisionListener-class, similar to the class in Rewb0rn's tutorial.( http://www.ogre3d.org/wiki/index.php/Og ... n_Handling )

But if I add gravity to my objects, they will fall on the ground and move into it. After that they can't be moved.

the tutorial says

Bouncyness

The higher these values are, the harder the object jumps back from a contact. If you experience that your objects move into each other from time to time, the reason could be that your bouncyness values are too low.


OK. But if I increase the bouncyness of my objects, they will fall on the floor and jump up again and falll down and jump up and so on.
What I have to do, that my objects either move into eachother nor jump back.

If I use the standard collision listener, the objects won't do so much trouble.
What does the standard listener do?

Thanks for help

Fred

Fred

28-12-2007 17:51:39

OK there is also an other probem. If my Object collides with e.g. a wall, it sometimes wil turn up or down(Rotation with reference to the x-axis(mhm don't know, but IMO it is x-axis(Object moving up) ;) ))
But because steering of my object depends on rotation, it's quite bad. Becaus now my object moves upwards. Is there an possibility to stop rotation in reference to certain axis or just set the rotation of one certain axis?

rewb0rn

30-12-2007 03:17:52

Bouncyness: You need to use values between 0 and 1, did you do that?
Rotation: you can change the rotation force of a certain axis like this:
x->setAngularVelocity(x->getAngularVelocity().x, x->getAngularVelocity().y, myValue);

Its 4 a.m. and I am not at home so maybe theres a mistake in it ;)