Picking Problems

Hallo Panda3d community,

coming from Ogre/Pythonogre I recently stumbled over Panda3d and I like it very much so far. :slight_smile:

I played around with a little rts-style game setup, so after I had setup a rts-style camera, I also did get box selection working (I’m using collision with 4 planes for the projected box). Afterwards I tried to do simple one click mouse picking.
I basically used the setup given in the Manual, but I encountered a problem:
In my collision traverser I have two from objects, the camera ray for picking and collsion sphere around my panda test actor for box selection.
The into mask of the ray is set to 0.
The from mask of the ray is set to the GeomNode default mask as well as the collision sphere’s into mask.
When I now try to pick the test actor I get all kinds of GeomNodes (including parts of the actor) in my CollisionHandlerQueue, but I never get the collision sphere.
Is there any explanation why I can’t pick the collision sphere around the actor?

Not from what you describe. There’s no reason that you can’t pick a collision sphere the same way you pick anything else.

I assume you aren’t loading the collision sphere from the actor’s egg file, since that isn’t supported directly (collision geometry normally won’t load from an animated model file). I also assume you’re certain about the from/into bitmasks, and that you’re beginning the traversal from render, or some other node above your collision sphere (and not below it).

Assuming you’re doing all that, it’s not obvious what might be wrong from your description.

David