There is no true 'plane' collider, but it can be approximated by a large shape. For example, collisions with a triangle's face work pretty much the same as a plane. It would look something like this:
Code: Select all
var ground = new Entity(new TriangleShape(new Vector3(0, 0, 0), new Vector3(100000, 0, 0), new Vector3(0, 0, 100000)));
That said, there are some issues to watch out for- contacts with the
edge of a large triangle will tend to be numerically unstable compared to the face contacts. So rather than making a big square out of two triangles, it'll tend to be better to have one bigger triangle translated to cover the same region.
Depending on what shapes are involved, using something like a large box might be preferable.
Certain queries won't work well with extremely large shapes, though. Vehicle wheel sweep tests might have some visible imprecision.
You might have better luck with using something like a Terrain composed of many triangles so that each one doesn't get so big as to cause numerical problems.
(The above is for v1. It sorta-kinda applies to v2 too, but v2 tends to use much more numerically stable implementations that allow bigger shapes.)