KramSurfer Posted July 12, 2018 Share Posted July 12, 2018 I have a need to know exactly how many times a user has rotated left or right, ideally it would just be a positive or negative float that i can divide by 2*pi I've noticed a variance in browsers and even session as the Y rotation value of the BABYLON.FreeCamera, sometimes it will go up into much higher 'rotation' values, but more often it stays between -3.14 and 3.14 Any ideas welcome. Thanks Keith R Morrison Quote Link to comment Share on other sites More sharing options...
trevordev Posted July 12, 2018 Share Posted July 12, 2018 You can try diffing the y rotation of the camera on each frame and adding the diff to a local variable that tracks how far the camera has rotated. See this playground http://playground.babylonjs.com/#UQ5ZS8 it prints how many rotations the camera is currently at every frame. KramSurfer 1 Quote Link to comment Share on other sites More sharing options...
KramSurfer Posted July 12, 2018 Author Share Posted July 12, 2018 Thank you. That is exactly what I was looking for. trevordev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.