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 (

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

Example -
Perhaps it would be good to make rotation smoother, with camera and it’s parent rotation values.


Thank you for answer and solition:).

1 Like