Follow camera's rotation property isn't working

Followcamera.rotation.z Not working
Hello everyone,
I try to create an earthquake game with Babylon js.

For create an earthquake effect I want to rotate my follow camera. like this
https://www.babylonjs-playground.com/#BYG518#1

But it’s not working on my project.

Basically, I want to create an earthquake effect user follow camera rotation property. The value is chinging exactly as I expected but it’s not working.

Is it impossible to rotate follow camera? If it, then how to create an earthquake effect?

I would be grateful if anyone could consider a little precious time for me.
Thank you, everyone.

A couple of points

  1. Your playground shows you using an ArcRotateCamera not a FollowCamera

  2. There is no rotation property for an ArcRotateCamera. you use an alpha (around Y axis) or beta (around Z axis) value to rotate instead see Cameras - Babylon.js Documentation.

Modified PG (playground) https://www.babylonjs-playground.com/#BYG518#2

1 Like

The first PG link is the followCamera example.
The second link is the effect he is trying to recreate using the followCamera.

1 Like

Ah. Got it. Don’t know how I missed it.

https://playground.babylonjs.com/#A9MZL8#70
This is my page. Where the follow camera is used.

A crashing FollowCamera https://www.babylonjs-playground.com/#BYG518#3

1 Like

I’m sorry but can you check it please why it’s not working in here
https://playground.babylonjs.com/#A9MZL8#70

First in your PG lines 78, 85 and 91 do not affect the followCamera, compare lines 63, 69 and 71in my PG

Also note your value for RATL in simplified PGs is 777 and in the full PG you use 7700 for cATLEAR

Corrected in https://playground.babylonjs.com/#A9MZL8#72

2 Likes

@JohnK
The issue I was having while looking at this was, that whenever a lockedTarget is set, the rotation property of the axes, or at least the Z-axis of the camera, isn’t used.
https://www.babylonjs-playground.com/#BYG518#26
I’m not sure if it’s possible, or if a better approach would be to create a custom camera based on the followCamera.

Thank you so much @JohnK …it’s working.