Well, it sounds like something else is wrong–if you’re using a CollisionHandlerPusher, and a CollisionSphere, it shouldn’t let you through a wall just for turning back and forth against it. Are you sure you’re using the collision system properly?
if you use a small collisionsphere and large movements speeds it’s likely that you can get trough the walls. that’s because of the maths involved in the calculation. (the sphere’s radius / (frames per second) must be larger then the movement per frame).
Ah… Eheheh, I’m actually using a CollisionHandlerEvent, not a CollisionHandlerPusher…
Can someone give me a quick crash course to converting a CollisionHandlerEvent to a CollisionHandlerPusher? 'cuz I gave a try to changing it, and it ain’t working…
The CollisionHandlerPusher wants to change the position of your node when it detects a collision. You will have to write the rest of your code so that it can handle your node being moved by the collision detection.
This doesn’t mean anything fancy. It just means that you can’t make assumptions that the node will always be in the same place you left it. Chances are good you have already written your code this way. (On the other hand, since you have implemented collisions using just an CollisionHandlerEvent, you probably have a lot of code that is dealing with collisions explicitly. You may need to remove this code.)
Other than that, you seem to have the right idea, I guess. But I’m a little confused by your character.cnodePath and cnodePath2. Are they two different solids that are both supposed to be representing the same object? Perhaps you should add both solids to the same CollisionNode, rather than having them under two different CollisionNodes. The pusher really wants to work on the model of one CollisionNode to push on one object.
Ummm… Sorry, but I’m not very sure about how to do it, the changing the code so that it can handle the node being moved by the collision detection bit…
Can you give me an example? Eheheh…
Ah, and about the character.cnodePath and cnodePath2, thats because I need to detect the front and the back, as the method I use now is that:
If cnodePath collides with the wall, hitFront = True
if cnodePath2 collides with wall, hitBack = True
And whenever I move, I do a check if hitFront or hitBack is true, if its not, I won’t be able to move front or back respectively.