I am attempting to override the default arrow keys with my own methods, it appears to work for a second than goes to default. More specifically I want the camera to move 360 degrees with the arrow keys. I set up defs to do this and when i press the arrow up key to aim camera up, the angle of the camera moves for a second, but then program jolts out of this and moves the point of view forward, which was the old command I was trying to override.
I had these kinds of errors several times and they are related to the way you typed your code. Most of the time, they are due because of involonteared mistakes… It will be diffucult to answer your question without seeing the whole code but you can try to debug using some:
print myVar #before entering your function
print myVar #at the middle of your function
print myVar #at the end.
print #just for separating the output
This can be very handy to understand what’s your function is doing and where the problem is coming from.
It was a combination of using base.drive(), as Thaumaturge wrote, and resetting HPR values unintentionally. Turns out i should have just changed each value independently, such as: