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…
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)
Thank you 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?
As a general rule, we don’t backport fixes into a previous version, so this is only on 5 beta, sorry But 5 is back-compatible with 4, so you could try updating too
Hi @carolhmj - I see the freeze when loading models is fixed, but there’s also a freeze when loading a CubeMap texture as well, and this one happens on v4.2.1 as well as on v5 … here’s an updated playground where you can see the issue: https://www.babylonjs-playground.com/#I6J7UZ#58
It seems to be caused by hundreds of calls to a ConvertCubeMapToSphericalPolynomial function … is this a bug or is there a smoother way to load this texture?
[quote=“jjv360, post:12, topic:26248”]ConvertCubeMapToSphericalPolynomial[/quote] is a really CPU heavy operation that should only be used once per scene when loading your environment texture.
This is actually only one call to it in your scene but the environment is rather large 1024 size cubemap.