How to keep camera fixed with third person controller?

I am trying to fiddle around with the script at Third Person Controller | Learn PlayCanvas and have a question.

How do I keep the camera fixed and allow the player to rotate and move in a direction that is relative to it?

For example if the camera faces the character from the back, when I press ‘D’ it should immediately face the camera and walk towards me.

if the camera is isometric from the top down, it should follow the character when it reaches a certain threshold.

It would require a few changes. Offhand:

  • Change the logic so that the player model rotation is done in PlayerMovement instead of the CameraMovement and is based on move direction, not camera direction
  • You also probably don’t need any animation but forward so the anim state graph and PlayerMovement will need to updated to reflect that.