[SOLVED] Collision not registering at all

Hello, I just started using Panda3d yesterday, and I’m having a bit of trouble getting collisions to work. I am able to get the player to collide with themselves, but not with anything else. I’ve read several tutorials but for some reason I keep missing something. I would really appreciate if someone could review my code and see if they can spot something I’m missing or doing wrong.

Here is the relevant parts of my code:

I feel really dumb, and I’m sure it’s something so silly, but I’m just sick of staring at this and wondering why it isn’t working. Thank you.

Edit: btw, the .show() doesn’t even make the collision plane (or sphere, I tried spheres too) appear. I have no indication that the _Plane object’s collision is being registered at all. What I’m trying to do is fall onto the plane. But I keep just falling through it. You can also see the full code on the same repo (main.py).

It might be that the relevant code has been omitted, but I don’t see you attaching the plane to the scene-graph anywhere. That is, you create a NodePath called “self.node”–but it’s never re-parented below any other node, and so isn’t a part of the scene. As a result it wouldn’t appear when “show()n”, and wouldn’t be available to the collision system.

1 Like

Oh my gosh, that was it. I knew it had to be something incredibly stupid like that. Thank you so much. I just needed to reparent it to render. :slight_smile:

1 Like