jessepmason Posted October 17, 2015 Share Posted October 17, 2015 is there by chance a way to limit the rotation of a camera? (not the arc rotate camera) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 17, 2015 Share Posted October 17, 2015 Yes, this possible:var camerasBorderFunction = function () { //Angle if (camera.beta < 0.1) camera.beta = 0.1; else if (camera.beta > (Math.PI / 2) * 0.9) camera.beta = (Math.PI / 2) * 0.9; //Zoom if (camera.radius > 150) camera.radius = 150; if (camera.radius < 30) camera.radius = 30;};scene.registerBeforeRender(camerasBorderFunction); Quote Link to comment Share on other sites More sharing options...
jessepmason Posted October 19, 2015 Author Share Posted October 19, 2015 Thank you sir! 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.