Hi there, I’ve recently been working with complex Terrains for a new upcoming game and I’ve noticed a bug that I’d call just fault of the Import System.
So I generally work with Blender3D to get my 3D models going, and I’ve also been using it to model hand made Terrains, at first when I tested the generated collision Mesh that PlayCanvas generates on asset importing with a 3rd person character movement it seemed to work right.
But tonight I was fully testing in collisions on Slopes, bumps, etc, and I was surprised to see that the character would go through the Terrain on very pronounciated Slopes. The character controllers are driven only by applyForce/applyImpulse, not setting linearVelocity directly.
The funny part in this is that after trying to figure out if I was the one making the mistake coding the character’s rigidbody movements, I gave a try to just import the Terrain with a different format.
At first it was FBX, where the going through Slopes problem appeared, but once I reimported the Terrain from an OBJ format, the Slope problem totally vanished, the character now basically stops advancing as expected, you basically don’t go through or climb the slope stupidly, it just works.
Any ideas why would this happen? I’d really prefer to use FBX as a standard format for all of my 3D models.
I was in the middle of setting up a public bug report project for everyone to see the problem and I discovered one thing.
This time I leaved the Capsule shape collision of the character with the default values that come in PlayCanvas, which is:
I’ve been testing for a few minutes and the problem seems to have totally disappeared. I placed the fix inside my production project and it also worked, I will keep testing and report on Monday if I happen to have this issue again.
The problem is still happening if I set the Capsule Collision to be like this:
These were the settings I used before for the characters on my game, but now I just scaled them to fit on a 0.5, 2 Capsule collision and everything seems fine.
Maybe there’s a problem with physics using tinyer values, I’m not entirely sure.
So reporting in to say that the Capsule Collider was still having some troubles going throught the terrain at some slope angles, I switched off to using a Sphere Collider and I’ve been testing around for a while trying any kind of Slope angles and it’s working perfect.