waverider Posted February 26, 2018 Share Posted February 26, 2018 Hy there! i'm working on a cancer project and BJS has proven to be more than resourceful, i want to control my cancer victim model with the mouse movement, its rotation is not that great. drag the camera right to view other models, click on the model you want to rotate and check animate..Thanks for your taking your time https://www.babylonjs-playground.com/#XPP99Q#1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 26, 2018 Share Posted February 26, 2018 You could switch between two cameras - a free camera and an arcrotate camera, positioned with the same position vector. A quick demo would be - https://playground.babylonjs.com/#68ZA74 . The main camera is a free camera. until you click on one of the meshes you can use it. Once you click on one of the meshes, the arcRotate camera will be activated and you will rotate around the selected object. Of course, this is just a demo and can (and should, actually) be extended. waverider and GameMonetize 1 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 26, 2018 Share Posted February 26, 2018 Hi guys. Didn't the user want to rotate the item, not the camera? Waverider, just move the arc camera.target to the clicked-upon mesh.position. Then spin the mesh. (or the camera, around the mesh) Or am I off-topic? Probably so. Interesting that you arranged these models in a circle, and not in a slideshow-like line... along an axis such as X. hmm. I would also consider a "rack of little icons/buttons" parented to camera (always on-screen)... to allow users to pick which models they want to view. Just thoughts. Party on. waverider 1 Quote Link to comment Share on other sites More sharing options...
waverider Posted February 26, 2018 Author Share Posted February 26, 2018 Thanks so much, finally got it to work!!! RaananW 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.