hcmetal Posted September 24, 2018 Share Posted September 24, 2018 Hello, everyone! I have been struggling with some strange universal camera behaviors. A simple scene with an arcRotateCamera in the air (left) and a universalCamera (right) on the ground, like this: The arcRotateCamera rotates very smoothly. No problem with that. The universalCamera, on the other hand, behaves a bit wierd. The walking (using arrow keys to move about) is pretty smooth, but the panning (click and drag mouse to look around) gets 'sticky' around the center of the screen, especially when looking at more objects, like the screen capture above. By 'sticky' I mean the camera is reluctent to rotate, as if there is a big fps drop. However, engine.getFps() shows no obvious fps drop. I am wondering: 1. If anyone has met similar situations and how to solve it? 2. Does the camera have some sort of inertia property that might result in this? Hope someone can point me to the right direction. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 24, 2018 Share Posted September 24, 2018 hello this could come from collisions perhaps? Try this: camera.checkCollisions = false; hcmetal 1 Quote Link to comment Share on other sites More sharing options...
hcmetal Posted September 25, 2018 Author Share Posted September 25, 2018 @Deltakosh, thanks for your help. I tried and collision doesn't seem to be the problem. I guess the camera seems 'sticky' because the amount of panning is more affected by the "speed" of the mouse drag, rather than the "distance". So when trying to make small panning adjustments, the mouse is dragging slowly because I am trying to carefully aim at something, and the camera doesn't seem to be very responsive. In other words, as I slowly drag the mouse for a long distance on the screen the camera isn't panning much, and as I loose patience and speed up the drag, the panning also suddenly speed up, resulting in a "jerking" effect. The sudden change from slow to fast makes the interaction feel "sticky". Hope I am not sounding crazy here. Is it possible to change the panning input from 'mouse-click-drag' to 'mouse-move', like in most FPS games? I would like to test and see if it makes things better. Cheers! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 25, 2018 Share Posted September 25, 2018 Well this is hard to figure without a repro Ultimately you can create your own controller if the default ones do not work for you: http://doc.babylonjs.com/how_to/customizing_camera_inputs Quote Link to comment Share on other sites More sharing options...
hcmetal Posted September 28, 2018 Author Share Posted September 28, 2018 I think I have solved the problem. I tried changing the 'inertia' property of the universal camera from default (0.9 I think) to 0.5 and the 'stickiness' is basically gone. Maybe I am just too sensitive about this. 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.