I can see the collisions, it’s just not stopping me.
:collide(error): Invalid attempt to detect collision from CollisionTube!
This means that a CollisionTube object was added to a
CollisionTraverser as if it were a colliding object. However,
no implementation for this kind of object has yet been defined
to collide with other objects.
I just assumed I had done something wrong in my set up. Will there be better support for collision tubes in the future? It does match my player a lot better then a sphere or spheres.
Alright, I’m working with spheres now. While I’m working on building the engine, I have a first person controller that lets me fly around the world, using “space” to increase the Z vector, and Q to decrease the z vector. When I’m facing a wall/floor and am moving toward it the collision works just fine. However, if I use the Q/Space option to move up and down I seem to be able to fly right through the world.
Is there a way to test to see if I’m just moving too fast and need to look here:
Or if my problem is something else entirely? I don’t think I’m moving too quickly:
if (self.keyMap["forward"] != 0):
base.camera.setPos(base.camera, (0,0.2,0))
The reason I don’t think I’m moving too quickly is that if I set that from 0.2 to 0.1, I still go right through (but I’m not sure what constitutes fast moving in Panda).
That helped some, it seems to be a problem more if I change my collision sphere’s size to be less then 1. I’m trying to find a good balance.
Edit: I think I will have to use a collision polygon, as my world is a cube world and I get weird collision issues with a sphere…I’m hoping the cube fixes it.
Alright, collision poly suffers from the same lack of implementation as the collision tube. Back to spheres.
I’m parenting my collision spheres to base.camera, is there a way that I can easily prevent the spheres from rotating? I basically want to do a (0,0,0,1) and (0,0,-1,1), so that it looks like this:
O
O
However, since I’m using a first person style controller, when I rotate, it ends up looking like:
O
O
or
O
O
(please excuse the ascii representation )
I’ve been trying a couple of things, but it seems like I recall a built in Panda function to freeze the rotation, but I’m not finding it.
I think what I’m looking for is a way to only inherit the position from the base.camera node, and not the rotation. Is that possible?
Please pardon the stupidity, but is there a “clear rotation” function that I can be using each frame? It’s easy enough to throw into my task manager that I think that’s the route I want to go.