CollisionPusher question (SOLVED... Somehow)

This question is a bit hard to explain, but I believe some people might have had this before…

Well… I kinda applied CollisionPusher to my character and walls, and it works quite well. However… When I move in between two walls which intersect (like a corner), my character starts spasming, causing the screen to shake uncontrollably (my camera is attached to my character).

I have a feeling that its due to it pushing against the two walls alternately, which push it out of the first wall and into the second. I’m not sure how to fix it though…

Can someone tell me how to make it such that my character will not spasm when he hits corners? Thanks!

P.S Actually, just found out that there are some cases where it will NOT spasm, but instead, moving against it continuously will cause it to fall through…

The CollisionPusher doesn’t handle walls at an acute angle (less than 90 degrees) very well. Thus, one easy solution is to avoid such acute angles in your model.

Another answer is to use a CollisionFluidPusher instead of a CollisionPusher, which handles acute angles a little better. However, as of 1.6.2, the CollisionFluidPusher was somewhat experimental and a little buggy. It works a little better in the nightly build version.


Ahh… I get it… Thanks!

But now… Umm…

Do you have any solutions for working with those type of angles then?

And… … How do I work with CollisionFluidPushers? 'cuz I tried replacing the CollisionPusher with a CollisionFluidPusher, and now I can’t collide with anything at all…

There’s no magic to using a CollisionFluidPusher; it should just drop-in and replace CollisionPusher. Though perhaps you need to have cTrav.setRespectPreviousTransform(True) enabled, as described in the manual.

As to avoiding acute angles, well, no magic there either: just design your floorplans so as not to require them. I’ve been in lots of environments, both real and virtual, that had no walls at all that come to acute angles. They don’t occur very often in the real world. If you must model an acute angle, put another (invisible) polygon straight across the angle, so that it prevents entry, and reduces the angle into two obtuse angles.


Ahhh… Now it works!

But now… Theres another problem with my props…

First, a bit of background. What I did for my props were to create collision boxes in maya, and then hide them in the game. And I have a little script inside which allows it to replace maya-created placeholder props inside the level with Panda-created interactive objects, so that I can create the entire level in maya, place the objects in Maya, and make it work in Panda.
However… When I try running against them when its on its side (lying on its side), it will… spasm of sorts, bouncing against the object at times, jumping RIGHT into the object at others.

I have a feeling that its because my collision solid for my character is pushing against 2 planes on the object at the same time. But I’m not sure how to fix it.

Anyone has any solution?

Maybe I should specify a bit…

Currently, my main problem is that my collisionPusher is completely going out of whack. Examples of stupid things it does is:

  1. Make me bounce against it
  2. The collision goes crazy, pushing my character in weird directions

I think I narrowed down the problems into two factors, mainly that:

  1. I created the collision boxes in Maya, and thus the “direction” of the collision box is changed, causing it to push in the wrong direction (as the object is rotated in different angles). This theory I’m not too sure about.
    Question: Can someone tell me whether the angle of the collision node will affect collisionPushers?
  2. I am colliding with multiple planes of the collision box at the same point in time, like the top of the collision box and the side, and I’m being pushed by both at the same time. The thing is, due to my collision box created in maya, and my object being rotated in very weird positions (such as being upside down, or on its side), I cannot create a “definite” top plane.
    Question: Is there anyone who has had a similar issue before, where they had to collide with multiple planes of a same object at a time, and managed to solve it? If you did, can you enlighten me?

Of course, if someone else can explain why my collisionPusher is going crazy, causing all those issues (basically, the direction of the pusher going crazy), PLEASE TELL ME!

P.S I apologize for such a long and… … pushy post (pardon the pun), but I’m in dire need of help, and I have absolutely no clue where to start. CollisionFluidPushers don’t work, setHorizontal doesn’t work either… Theres not much I know, other than to create the collisionPlanes in Panda itself… And to scale collisionSolids? No thanks. The other method I know is to make the entire mesh “collidable”, using the tag, and I have a feeling that it will lag the game to kingdom come.

Well, there’s nothing fundamentally wrong with rotating a collision solid. There’s also nothing wrong with colliding with two perpendicular faces of a cube at the same time; both of these things should work fine, and have worked in the past.

Things that are known to cause problems are:

(1) Normals being out of whack with the faces, but the normals are computed implicitly unless you go out of your way to set it, so I doubt this is a problem in your case.

(2) Back-to-back polygons, facing in opposite directions, being triggered simultaneously. This can happen if your cube is too small and you collide with both the front face and the back face at the same time. It can also happen if you accidentally model your cube with two-sided walls (so that each wall has a normal facing in both directions), which is almost always a mistake.

(3) Scales on collision solids. This sometimes causes trouble. If you need to scale a solid, you should usually follow it up with a flattenLight(), to apply the scale onto the vertices. Even if you are not applying a scale, you might try flattenLight() anyway to see if it helps.

Can’t think of anything else right now that might be causing you grief.


Thanks for replying! But damn. Tried all the tricks you gave me, and none of them worked, for some weird reason.

Decided to just use the usual method (Which apparently converts the stuff to a collision solid, I just realized…), and take out my weird tags, and make the entire collision box connected in the Maya, and it surprisingly is ALMOST done working. The only problem is that on ONLY ONE FACE (A face on the right, length-wise), the pusher screws up, in that instead of pushing against the box, it bounces against it…

I tried flattenLight ,reversing that face, detaching that face, tagging that face specially, but everytime I modify it, the box screws up again…

Umm… Any ideas about that? I’m really sorry once again, I much appreciate your help!


Looks like I found the problem. When I take out the top and the bottom of the collision box, it works perfectly. I believe its due to the “direction” of the top and bottom planes, which cause it to push in its direction. I approached it from a different direction, which causes it to push me back…

But now I have a new problem in that I have no idea how to avoid this issue… I can’t make it separate planes (unless its keeping every plane in a separate egg file, which is EXCEEDINGLY tedious), because the entire object might be in a different position, causing the top and bottom to be left and right or up and down.

Any ideas how to avoid this “directional” issue?

Hmm, I still don’t quite understand what’s going wrong in your situation.

Are you using pusher.setHorizontal(False)? If you don’t disable horizontal-only mode, you may have problems with surfaces that want to push you in a semi-vertical direction.

Other than that, can you use another shape instead of a box? For instance, a sphere? Spheres tend to be well-behaved in all directions.


… This… Is BEYOND amazing. And irritating.

My problem suddenly vanished.

I remade the collision box in maya (for the… 5th time or so) and exported it, and it worked.

Pushing works, against all sides…

Thank you very much though… I seriously wish I knew how I did it… … …

P.S I can’t use a sphere because the object I’m encapsulating is a box…

If you have the old Egg file, maybe check the working one and broken one and see what the difference is? Maybe you had some degenerate triangles or something, or the node scaling was negative in one axis of your box?

Anything like that, and collision response will be undefined.

I had the same issue, and fixed it while solving a different problem. In my egg file, there was a line that said Dart {1}. I’m still waiting to hear what this actually does but when I removed it my models no longer popped at the corners. Check and see if that is the case.