Cant see my second collision sphere?

Ok im finally learning how to ass collision shapes so i have a sphere for my ship that shows up fine:

I put this in the init for the ship:

        self.collisionBounds = CollisionSphere(0, 0, 0, 100)

and then i put this in the shipRender method:

            # setting up colision detection shape
            self.collisionShape = self.ship.attachNewNode(CollisionNode('collisionShape'))
            self.collisionShape.node().addSolid(self.collisionBounds)
            self.collisionShape.show()

So this showed up perfectly when i did self.collisionShape.Show

I did almost the exact same thing for my planet’s sphere and made it big enough so it wouldnt be inside the planet (the only thins i changed was

            self.collisionShape = self.ship.attachNewNode(CollisionNode('collisionShape'))

To this:

            self.collisionShape = self.sphere.attachNewNode(CollisionNode('collisionShape'))

I dont know why it wouldnt show up and i have been trying everything :blush:

common problems:

  • the node isn’t actually attached to the scene
  • the sphere is still inside the visible geometry (if you can’t see it, how do you know you got the scale right?)
  • the sphere is so far outside the visible geometry that it’s past the camera clipping plane and/or is backfaced around the camera
  • the sphere is not centered on the visible geometry you expect
  • you’ve re-used a variable, so transformations aren’t affecting the node you expect
  • visibility has not been turned on for the branch of the scene the node is attached to

one thing to remember is that if you have a model (radius 1), scale that (by 100), attach a collsion sphere (of size 100), the collision sphere will have a size of 10’000.

better make a parent node without scales, attach the model (scale this one) and the collisionsphere there to prevent this possible issue.