I’ve been trying to design a control scheme where holding left or right makes you walk perpendicular to the camera, which tries to align itself with you, causing you to walk in circles (if you don’t get what I mean, this is how most 3rd person games work).
I tries to replicate it by having two empties, positioned to the left and right of a cube, which are parented to the camera. The camera is behind the cube and is slow parented to it.
Ive added a track to actuator (with time set to 15) to the cube’s logic so that when I push the left the cube tracks to the left empty.
It works fine with no parent between the camera and cube, but if I parent them, the cube stops rotating halfway towards the original position of the empty.
Does anyone know of any solutions or workarounds?
I can’t tell you whats wrong with your blend with out actually seeing it, but I can give you my move from view blend. Its basically the same concept, but with Python. The script does all the calculations. My example is quite advanced, but if you are only really dealing with the same axis and your character wont be turning at all, you can always just use logic bricks that track to and move to one of the empties that I have setup.
Just ask if you have questions, that wasn’t the best explanation ever.
MoveFromView.blend (142 KB)
Thanks for the script, but I want the camera to center itself behind you when you walk.
Also, what do you mean “the same axis” and my character “won’t be turning”? I’m trying to make full 3d movemont, where when an arrow key is pressed. character to turn at a moderate speed to face the empty while moving forward, with a self-centering camera. I’ll attach the .blend file in a few minutes, I didn’t save it last time, but I have a feeling that my method just can’t be made to work…
Great, somehow I just got it to work now.:rolleyes:
Sorry for wasting your time and thanks for the help.