EDIT: SOLVED! (see https://blenderartists.org/forum/showthread.php?446116-Possibly-Buggy-Function)
I am using a modified version of this third-person template by laser blaster in my game:
I have found that the camera script (“Camera.py”) has a bug that, when the camera is manually controlled, causes crazy jittering while certain conditions are met. Below are some steps to recreate the bug:
- Open the .blend file in the template
- Duplicate one of the ground platforms and make it very large (or just make a new one; this step is only for making the glitch easier to see)
- Start the game, and press the middle mouse button to activate manual camera control
- Go to your large platform and have the character run directly towards the camera (if using wasd-mouse, just hold s key)
- jerk the mouse/camera quickly left or right, after a few moments you’ll notice the camera jitter like crazy
Another glitch (or perhaps a symptom of the same glitch) is caused by setting the default camera control to manual (set “auto = False” in “Input.py”)
Then, after playing the game once and pressing esc to end the game, press p to play again WITHOUT MOVING THE MOUSE BEFOREHAND (mouse pointer starts at exactly screen center) to cause the camera to rapidly spin around the player until the mouse is moved.
I have spent several days trying to fix this bug myself; I am good enough at python to be able to edit most of the other scripts without issue but I have not been able to figure out the camera script. If someone could please take a look at the script and its associated functions and help figure out this bug, I would greatly appreciate it!