I 'm wondering if it’s possible to set an arbitrary geometry as a collision node.
My need is the following:
I’ve got my arena full_arena.egg (detailled and so on)
i’ve got a simplyfied arena arena_collide.egg (which is less detailled but cannot be resume to
one sphere or one cube).
I would like to inform the collision system that arena_collide is the collision node for full_arena.
Is it possible in Panda on python side?
or is it to be done in eggfile?
Ok i 've done the "ObjectType Barrier " trick in my egg file.
So now i’ve got one egg file that contains a full_arena group and a arena_collide group which is a “Barrier”.
But how do i access from python the arena_collide group to set it’s collision mask for example?
and how do i show the collisionnodes that have been created from my arena_collide model?
I realized I had the wrong method call for this one. To show all collision nodes, not just the first CollisionNode found, you need to do this:
render.findAllMatches('**/+CollisionNode').show()
All of the show() calls have a corresponding hide() call to go back to the normal hidden state. To turn off the result of base.cTrav.showCollisions(render), use:
Hello,
I’ve tested now i see my “barrier” in pview hierarchy list and also if i ask pview to report collision surface.
Also the barrier is non visible by default, This is perfect.
However i’m still not able to attach the Collision node and to set flag on it.
I’ve tried:
You are doing more code than you need to do. You are perhaps following examples that show how to set the collide mask for geometry that is created completely on-the-fly, but for geometry that you load from a file, you don’t need to do all that stuff.