ozRocker Posted December 20, 2016 Share Posted December 20, 2016 I notice if I pan, rotate a bit, then scale and do that whole sequence a few times, the pivot point starts to shift which is noticeable when rotating. Is there a way to prevent the pivot point moving? I'm trying it out here www.punkoffice.com/scan/cat_kasey (use right-click to pan) Quote Link to comment Share on other sites More sharing options...
adam Posted December 20, 2016 Share Posted December 20, 2016 I think you are going to have to prevent the camera from tilting to avoid this from happening. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 20, 2016 Author Share Posted December 20, 2016 2 minutes ago, adam said: I think you are going to have to prevent the camera from tilting to avoid this from happening. Yikes! I only just noticed that :/ yeh, if I tilt and pan the pivot goes way off. I assume tilt means the camera's beta. I can't turn that off though 'cos I want the user to be able to see the top and bottom of the model. Are there some tricky transformations I can do to workaround this? Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 20, 2016 Author Share Posted December 20, 2016 I made a playground with some objects here: http://www.babylonjs-playground.com/#16Y5X1#0 (use CTRL + LEFT MOUSE BUTTON to pan) Quote Link to comment Share on other sites More sharing options...
adam Posted December 20, 2016 Share Posted December 20, 2016 It might not be the best fix, but it's simple: http://www.babylonjs-playground.com/#BAXEA Quote Link to comment Share on other sites More sharing options...
ozRocker Posted December 20, 2016 Author Share Posted December 20, 2016 9 hours ago, adam said: It might not be the best fix, but it's simple: http://www.babylonjs-playground.com/#BAXEA YES IT WORKS!!! Thank you my friend Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 21, 2016 Share Posted December 21, 2016 ah, so setPosition is zeroing the rest, nice http://www.babylonjs-playground.com/#BAXEA#2 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.