odebody/geom tag


I was using simple collider in the past to manage collision between objet, and I use a lot the possibility of tags, to add information, from object of my game.
Indeed, I got a ship, so a class ship, and for one instance of ship, I got ship1, with a model and a collideNode.
With tags, I can retrieve easily the object from collision.

For now, I am using ODE, body and geom are the results of collision, and I don’t know how to retrieve the object they come from. I wonder about setData, getData, but it is not documented.

Try OdeBody.setData() and getData(). You can set any Python object with this method, including a pointer to the original object of your choice.