ArcRotationCamera - what does the property speed and cameraDirection use for?

So, What does the speed and cameraDirection used for — the property of ArcRotationCamera. anyone can show me a demo to explain it.

I’m making a game that a character jumping on stairs and I want the ArcRotationCamera to follow the character. I try to use the lockedTarget property to follow the character but it’s too shaking.

So, I guess maybe the properies of above can help me or the only way to figure it out are calculating camera position and target by myself.

For an arc rotate camera, you need to play with:

  • inertialAlphaOffset
  • inertialBetaOffset

These two values will update the alpha and beta angles using inertia so it will produce a smooth movement.

This is what the system uses when you move your your mouse or with touch

Ok! Thank you my friend. I will try your suggestion.

Hey CH, I think there is a “followArcRotateCamera” too… might be worth looking-at. I don’t think I have ever tried it.

I tried a little “constant target setting” in THIS playground… line 87 - which is inside the renderLoop. Unfortunately, it disables camera orbiting/panning. I’m not sure why. (beard scratch)

Ahh… it needed a camera.update() in line 88. https://playground.babylonjs.com/#KQV9SA#29

Now it orbits again, WHILE following. A camera target COULD be invisible. hmm. AND camera.target can be a vector3, too. Check this out… https://playground.babylonjs.com/#KQV9SA#30

Line 87… gruesome. Makes the camera target balloon3.position, but 20 units above it. So, hmm… you could just keep adding stepHeight to current cam.target… doing it for each step climbed. Just some weird ideas. :slight_smile: