Majeed Siddiqui Posted August 16, 2016 Share Posted August 16, 2016 I have free camera in orthographic camera mode. I don't want camera to move at all on mouse or any other kind of input. So I tried not calling attachControl with this, camera doesn't react at all (Good!) but boxes in this scene with actions registered to action manager also do not react to mouse inputs. Second approach I tried is calling attachControl with following function: scope.registerBeforeRender(function () { // I want top view camera.rotation.x = Math.PI / 2; camera.rotation.y = Math.PI / 2; camera.rotation.z = 0; }); When I try to move ground with mouse it does move slightly. As shown in image. Help needed. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 16, 2016 Share Posted August 16, 2016 um, you would need to overwrite the mouse events to the camera... If I had more time this morning Id help but I gotta get to work. Summoning @Wingnut Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 16, 2016 Share Posted August 16, 2016 Gosh @Pryme8, how would I have EVER found this 0-reply topic without your dedicated assistance? Yikes! @Majeed Siddiqui, how's it going? I hope well. Here's a playground where I tried a few things and failed at most of them: http://playground.babylonjs.com/#WX234#1 But, I did come across some thing that might work. Look at lines 7/8. Would that kludge-solve work for your situation? In my minimum testing, I wasn't getting much camera movements, no matter what I tried. (okay, okay, I still see a TINY bit of movement during fast mouse-drags. Tolerable?) Picks and mouseovers are still working, so maybe we don't need to dig any deeper. Holler back, as needed. There's some Gods of the camera input system... hanging around. Maybe they will visit. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 16, 2016 Share Posted August 16, 2016 Ive done it before... hold on I thought I had it, but I was wrong. camera.inputs.removeByType("FreeCameraKeyboardMoveInput"); camera.inputs.removeByType("FreeCameraMouseMoveInput"); https://doc.babylonjs.com/tutorials/Customizing_Camera_Inputs looks like the mouse move is still working... but Im sure you will figure the solution out with this. jhadenfeldt 1 Quote Link to comment Share on other sites More sharing options...
Majeed Siddiqui Posted August 17, 2016 Author Share Posted August 17, 2016 @Wingnut @Pryme8 Thanks a lot! I have combined both now its working. There is small glitch but its tolerable. I am holding for further assistance. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 21, 2018 Share Posted November 21, 2018 Whoa, blast from the past! 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.