Is it possible to rotate while using lookat?

I am trying to make it so that the book is rotating around its y axis, while also looking at a specific point.
https://www.babylonjs-playground.com/#25WD8R#1

I have tried to update before and after the rotation.

Side note, is there a performance benefit for using animations to do this, versus registerBeforeRender?
I couldn’t figure out how to get the rotation I wanted to work with animations, which is why I went with this method.

Could you do something as simple as resetting the z and x values of the rotation?
https://www.babylonjs-playground.com/#25WD8R#2

I don’t think that is quite what I am looking for.
I have a solution currently, but am unsure if it is the best one available.
https://www.babylonjs-playground.com/#25WD8R#3

1 Like