The perspective camera is fixed in place and continuously lookAt at the moving avatar
After the character moves a certain distance, the camera will jump to a position behind the character
I’m using joystick’s radian position for the avatar’s Y rotation
However when I push the joystick 90 degrees, the 3D avatar doesn’t move forward, instead it rotates and moves to the right.
And when the avatar rotates towards a different direction, pushing the joystick 90 degrees results in the avatar again changing to a different direction.
I’ve included a drawing showing the fixed joystick and the above situation.
Sorry I forgot to mention that after a certain distance, the camera will move to a position behind the character, so kind of like a third person camera but with a delayed / spring effect. The problem is that after the camera has moved behind the character’s new orientation, pushing the joystick in the same direction changes the orientation of the character.
e.g:
In initial position push joystick to radian = 1.57 and character moves forward
In new position push joystick to radian = 1.57 and character moves left or right
I need to keep the joystick directions consistent for the character. For example joystick radian = 1.57 always translates the character forward regardless or camera or character orientation. Is this possible?