initSurfaceTable ODE World


can someone explain me how to init the surface table, and what is the parameter exactly?

Thank you

This may be helpful: … n_with_ODE

Sorry, I already read it, and it is not clear for me.


what is the value of numberOfSurfaces? on what is depending this value?

For instance, in my game, it is space game. There is no gravity, with no ground. Only spaceships and asteroids, colliding each other.

I think that’s the number of surface types. Different types of surfaces can have different properties, eg you could have a rubber floor and a paved floor, the former being more bouncy than the other.

like in this example:, 0, 0.8, 0.0, 10  , 0.9, 0.00001, 100, 0.002), 1, 0.8, 0.1, 10, 0.8, 0.00005, 0, 1), 2, 0.9, 0.1, 10, 0.8, 0.00005, 0, 1), 1, 0.4, 0.2, 10, 0.7, 0.00005, 0, 1), 2, 0.4, 0.2, 10, 0.7, 0.00005, 0, 1)

Yes, but I have no surfaces like that, only models. So do I to do this :

So you don’t use ODE’s collision detection at all?

I want to use oDE collision detection, and ode reaction.
For the moment, I use by default.
But I wish just to understand the parameter, I don’t like to use without understanding… :wink:

It is the number of different surfaces in the surface table. Every entry defines the reaction between two different surfaces in that table.

If we try to apply this to my context : game in space, without walls or ground, only models trying to collide each other.

I wonder how to parameter this table?

You could start with having only 1 entry in there, and using that for everything.


Thank you