Nothing happened while setting camera.rotationOffset = Math.PI/4;

The demo is below.

I set camera.rotationOffset with value Math.PI/4, nothing hanpened for that change. In anther word, camera did not rotate for the expectation.

Is anything wrong? How can I drive the camera rotation function?

In this specific example you are changing the rotation offset on each frame in line 88. This is a simple reproduction with only the box and while the rotation offset changes continously:

Example of Camera | Babylon.js Playground (


As explained by @RaananW I suppose you did something wrong. In the example you used, the camera rotation is constantly updated, whereas if you change it for just this (which I suspect you did):

camera.rotationOffset = Math.PI/4;

Well,… then the camera already has this value after the first call and will not update.
I’m not sure what your goals is but I suppose it must be something like this?

Yes, smart way. thanks