Collision in Unreal Engine vs Unity

So the advice from this Unreal Engine lecture was to give a simple box collision some thickness so that the player doesn’t fall through it. In Unity, we can have flat mesh colliders, flat terrain colliders, and for 2d, we have edge colliders, and composite colliders with “outline” geometry type, provided that the rigidbody/rigidbody2d objects that are expected to collide with these colliders are set to interpolate. Is it the case then that in Unreal Engine, you can’t or shoudn’t have flat colliders?

Collision is just simply computed differently. If you want to collide at the boundary of the object, you have to deal with this by sweeping and looking at the point of intersect on the surface of the collider. Normally Unreal does it by bounds checking so if the end point lands within the bounds of the collider but it does also support sweeping as well.

Sweeping is more computationally expensive than bounds checks which is why it is not the default and would have to be if the collider was flat.

So, is it possible? Yes. Is it necessary? No. which is better? I would say bounds checking for performance reasons at a slight loss of accuracy but if you need the accuracy sweeping at the cost of performance.

Usually you only need a collider around 50 units deep, sometimes 25 depending on the velocity of the object impacting on the collider.

Privacy & Terms