Help With Glitching Game

I have been working on a video game and it started acting up in respect to the camera. If you look up or down it will start glitching and then all the sudden it is like you are upside down. I have checked and I don’t think it is collisions gone wrong, but if you guys wouldn’t mind look through and see what you think it is. Here is the link to the file

Looks like you need permission to download the file…

My best guesses:

  1. Camera’s clipping values (near/far).

  2. If you’re using the Mousemove script, sometimes if the mouse is not centered before the offset is calculated (which is used to orient the camera), it’ll calculate a huge value and the camera will orient outside the normal range. Hmm, I made a change to the Mousemove script, should go post the fix in the thread.

I updated the link so it would work, I am using the mousemove script, but I don’t think I changed anything on it and it worked just fine beforehand. I tried changing both the near and far clipping values and it didn’t do anything to help. If someone with more experience in BGE could take a look at it I would be very grateful.

Well, Jacob, I fixed the problem with the camera going crazy! You just need to change that Always sensor connected to the mousemovement (python) to a Mouse sensor, with Movement, and then just change the Python controller to script instead of module and replace it by this script here(Mouse_look.txt):

I think I found whats wrong…You have some axis fighting going on. Lots of stuff has different rotation applied to it. In the mouselook script it has which is attached to the cube you have -z set as forward. Looking in this pic you can see that -x is forward on your object.

So its constantly fighting axis.
So I grabbed your cube and CTRL-A and applied rotation, to set -y as forward. Then I grabbed everything parented to the cube and not the cube itself and rotated it 180 degrees around to the other side. Like below

Then i changed line 76 in the mouselook script to false. to use the +Y axis for forward and it stopped the glitching. The
file is too big for me to re-upload but hopefully that will help.

Also, the mousescript have no cap limit, so basicly it rotates without limit verticaly and goes from up to down, which is not very realistic

Thank you so much, I will make sure to be more careful of getting my local axis lined up right
I will put some rotation constraints on the camera to keep it from being so unrealistic

Thanks guys, this is what I love about this forum, people know what they are talking about and reply quick. Thanks again