Problem when checkCollisions and useRightHandedSystem are used together

Hi, I’m currently working on porting an app from Three.js to Babylon.js, and I’m encountering a problem that seems like a bug to me… Here’s a playground showing the issue. You end up sinking through the floor as you walk around, and if you try walk into the hilly area, you just immediately glitch through the floor. This only happens if useRightHandedSystem is enabled, but unfortunately I need that enabled in order to be compatible with the existing worlds created using Three.js …

I don’t really know if there’s a way around this, or if I’m just doing something wrong…

By the way, when loading the playground if you experience lag you should set it to use 4.2.0, not Latest (5.0.0), since Babylon v5 currently freezes up the entire browser for 15 seconds or so while loading the model, not sure why…

Hi there, welcome to the Babylon community!

About the collision issue, it does seem to be a bug, thanks for finding that! This seems to only happen when colliding with a mesh terrain, not with a plane or something created from CreateGroundFromHeightMap, weirdly: Ground From Height Map Examples | Babylon.js Playground (babylonjs.com) :thinking:

I’ve opened an issue and am taking a quick look at it, hopefully is a simple fix: Incorrect camera collisions when scene is right handed · Issue #11688 · BabylonJS/Babylon.js (github.com)

2 Likes

Thank you :pray: if you can think of a workaround in the mean time as well, please let me know… I was thinking of trying to create a clone of the mesh, making it hidden and flipping the normals… I’ll try that when I get some time as well

That might be a good workaround. Another thing I thought of was adding physics on the scene and associating the camera with some kind of “player” object that walks around the world.

Hi @carolhmj, I’m back at work today… It’s great to see that’s there’s a fix already! Is this going to be released as a 4.x version, or should I just fork it and pull in that change myself?

1 Like

As a general rule, we don’t backport fixes into a previous version, so this is only on 5 beta, sorry :frowning: But 5 is back-compatible with 4, so you could try updating too :smiley:

Unfortunately I can’t use v5 until the loading issue I mentioned above is fixed, but I’ll look into doing a fork in the mean time :+1: thanks!

About the loading issue, I created an issue on Github so we can keep track of it Browser freezes when loading model · Issue #11747 · BabylonJS/Babylon.js (github.com)

1 Like

Great :+1: if that is fixed, I can use v5 directly

2 Likes