How to give FreeCamera or UniversalCamera Rotational Properties

I’m trying to make a third person camera using either the FreeCamera or UniversalCamera (Any other camera doesn’t work with my targeting logic). I’d to like the maintain interpolation behind the target while also being able rotate the camera around the target as well similar to the ArcRotateCamera.

I figured I could accomplish this by tracking mouse movement and then rotating the camera by the distance moved but I’m not understanding the logic needed to accomplish this.

how about it?
https://playground.babylonjs.com/#5M8FEN#1

Of course, you should have some control over the camera rotation rules via mouse movement events|

In fact, if you have some rotation and a correction formula for it, you might as well just useArcRotateCamera.
https://playground.babylonjs.com/#5M8FEN#2

I more so looking for a third person camera that would follow a player mesh while moving like the example above.

Here’s how to do it in the video

  1. the camera stays on the default character’s back view only once.
  2. when moving from side to side, the character moves from side to side, but the camera stays in the first back view or a little alpha correction and radius correction.
  3. in attack mode, I adjust the radius and target position slightly.

This is the main camerawork I see.

A lightweight implementation of advancing. how about it?
https://playground.babylonjs.com/#5M8FEN#7

1 Like

Thanks, I didn’t even think of adjusting the fov to provide the same lag effect.

1 Like

You may have a look at GitHub - ssatguru/BabylonJS-CharacterController: A CharacterController for BabylonJS - seems there is everything you need.

2 Likes