I made a LODNode, attached a tree-model and a billboard of it for bigger distances.
When checking for collisions i collide with both no matter which is switched on.
Propably the switched-of node is just hidden.
How can i only collide with the switched-on node and still get (almost) the performance of LODNode?
Or is there even a better way to do it?
Collision-with-geometry is disabled for anything other than the lowest LOD. But collision with ordinary CollisionNodes will work with all children of an LOD, unless you set the collision bits yourself to disable this (which you should, if you really have multiple CollisionNodes at the different LOD levels).
I imagine that from far away a tree not much bigger then a point could have a simple sphere collision solid, closer it could be a tube for the trunk and 2-3 sphers for the branches, at point blank maybe more precision is needed and a low polly collision mesh is needed? I can imagine somethin like that say for a game of picking apples (farmer games are so popular this year).
But you never collide with a tree when it is far away. Only when you’re close enough to touch it. So what would be the point of having multiple LOD’s in collisions?
Anyway, collisions are very expensive for highly detailed models, but relatively inexpensive for coarse models; that’s why Panda selects the lowest level of (visible) geometry for the default collision level. But for CollisionNodes, Panda assumes you have constructed suitable geometry specifically, and does the collision calculation with whatever you give it.