3Dlove Posted October 7, 2015 Share Posted October 7, 2015 Hello guys :-) Here is the playground :http://www.babylonjs-playground.com/#21NME5#1 When you walk toward the red wall, the engine make a bounce in back, due to the collision.Thats not happen when you walk toward blue walls. How to solve that ? Thanks and have a nice day =D =D =D Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 7, 2015 Share Posted October 7, 2015 That's an a wonderful feature! Camera bouncing... Well, the simplest (temporary) fix would be this - http://www.babylonjs-playground.com/#21NME5#2 I have no idea why that happens, but it is really interesting. Both small planes are causing this. Maybe try avoiding using planes (a box would actually work better at the bottom) until we inspect this. Quote Link to comment Share on other sites More sharing options...
3Dlove Posted October 7, 2015 Author Share Posted October 7, 2015 Okay thank you, I can't use your solution because I use a scene generated by Blender, so I will try with a cube So, is it a bug ? =p Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 7, 2015 Share Posted October 7, 2015 no, not a bug. a feature Quote Link to comment Share on other sites More sharing options...
3Dlove Posted October 7, 2015 Author Share Posted October 7, 2015 Okay^^ I tried with a cube, but same issue :http://www.babylonjs-playground.com/#21NME5#3 Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 7, 2015 Share Posted October 7, 2015 seems like an issue with the mesh's position. http://www.babylonjs-playground.com/#1MIHVA(look down, walk forward)if you change the y position it is fine:http://www.babylonjs-playground.com/#1MIHVA#1 With scaling it works as well:http://www.babylonjs-playground.com/#1MIHVA#2 no time at the moment, i'll try debugging it later. anyone else is more than welcomed :-) Quote Link to comment Share on other sites More sharing options...
3Dlove Posted October 7, 2015 Author Share Posted October 7, 2015 Seems like to depend of y height of object and camera ellipsoid :I took your 1st example and change y ellipsoid : http://www.babylonjs-playground.com/#1MIHVA#3 That could be problematic for baseboard for instance :/ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 7, 2015 Share Posted October 7, 2015 Hello this is because the gravity is too strong for this scene:http://www.babylonjs-playground.com/#21NME5#4 As the camera try to climb the small stair, the gravity generates an opposite vector which is too powerful 3Dlove 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 7, 2015 Share Posted October 7, 2015 As I said, a feature :-) GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 8, 2015 Share Posted October 8, 2015 "gravity is too strong" sounds strange to my ears... The scene in the PG is 50 units wide, and in the engine, gravity is set to -9.807 in Y.Since earth gravity is 9,807 m/s², we can consider that for physic calculations, meter is the default unit in BJS.So for this particular scene, designed at "human scale", the gravity should be the right one, and not "too strong". Am I missing something ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 8, 2015 Share Posted October 8, 2015 I've just analyzed the result (debugging in the PG) and I saw a gravity value of 122 But it was actually a bug that Raanan fixed like a boss Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 8, 2015 Share Posted October 8, 2015 Yep! For future readers, explanation in this post : http://www.html5gamedevs.com/topic/17709-free-camera-collision-problem-with-mesh/ Quote Link to comment Share on other sites More sharing options...
Myjestic Posted October 31, 2017 Share Posted October 31, 2017 Hi, same problem here on BJS 3.0. How can I get rid of this bounding effect. In the PG @Deltakosh posted http://www.babylonjs-playground.com/#21NME5#4 , he inserted scene.gravity.y /= 100; For me this is not an option, because if you look to the ground and walk backwards you will fly up. If I increase the height of the step (mesh) it will work. But is there another possibility? Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 1, 2017 Share Posted November 1, 2017 How about just reducing it to /10? or /20 ? Seems like it reduces the bouncing effect, and you don't fly high when going backwards Quote Link to comment Share on other sites More sharing options...
Myjestic Posted November 1, 2017 Share Posted November 1, 2017 I tried that already. If I reduce to 10 or less, bouncing is reduced but I can "fly" away. Tried it here. Just walk against the box. https://www.babylonjs-playground.com/#4HUQQ#206 Any other suggestions? Quote Link to comment Share on other sites More sharing options...
Myjestic Posted November 8, 2017 Share Posted November 8, 2017 Hey @RaananW any other approches for this issue? From another topic @Deltakosh wrote this problem is fixed. On 8.10.2015 at 5:02 PM, Deltakosh said: Yep my fix was the wrong one. Raanan found the issue we introduced with 2.1 It is now fixed I can't get around this problem. It is not an option for me to reduce the gravity or increase the height of the camera ellipsoid. BJS "thinks" this is a stair. Can I disable this behaviour? Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 15, 2017 Share Posted November 15, 2017 Wow, that's a quote from 2015! I guess it was fixed back then. Probably by me if DK said so... You can increase the scene's gravity to avoid the "flying" behavior. You could force the ellipsoid of the object to be bigger just to not walk on top of it. You could run a beforeRender loop, forcing the person to always have a static y position (no idea if this would really work). 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.