[BUG] Terrain Collision Meshes

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.

It actually continues to happen, but less times than it would do with an FBX format.

I’m starting to think that it happens more often depending on the scale that you set to the Terrain.

Could it be?

Made a ridiculous slope, the player controller which consists of a dynamic rigidbody with a capsule collision shape goes through it 100% of the times :frowning:

Can you share that mesh please? Or something similat that shares thge same problem?

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:

Radius: 0.5
Height: 2

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:

Radius: 0.25
Height: 1

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.

1 metre shouldn’t be a problem. Can you share the collision mesh please?

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.

If you still want to check if there’s any problem with the capsule collider, here’s the terrain collision mesh I am using as a test: http://devmidgard.com/test_terrain.fbx

To reproduce just set a capsule collider with the settings I said initially (0.25, 1) and try to move it around, go against the mountains, slide off them, and you will surely go through the terrain.

What exactly are those attributes?

The fbx is exported from Blender3D.

My email is me@devmidgard.com