How to track player's turn in UniversalCamera?

Hello, in the example in PG, the player can be controlled with the arrow keys. The camera stays still when the player turns left or right. What I want is to fix the camera to the back of the player or to rotate the camera with the player. How can I do that? I request your help.

Third Person Example | Babylon.js Playground (babylonjs.com)

          //  camera.parent = target;
          camera.parent = character;

Example - https://playground.babylonjs.com/#G703DZ#128
Perhaps it would be good to make rotation smoother, with camera and it’s parent rotation values.

6 Likes

Thank you for answer and solition:).

1 Like