Camera Frustom Aircraft 3D

I understand that CalculateFrustumPlanes() in Unity3D returns an array of Plane objects, each of which represents a different truncation plane, but I cannot find any documentation to suggest which one is?

eg

 [0] = Front [1] = Back 

and etc.

I need to calculate whether a point in space (for example, the center point of the bounding volume) is in the truncated space of the camera for a tree tree system.

+4
source share
2 answers

How exactly the order of Planes in the returned array is not documented (and I don't know that).

In any case, I think you can understand this without much effort: you just need to place the camera in a well-known orientation and check the normal value of each Plane .

I need to calculate whether a point in space (for example, the center point of the Bounding Volume) is in a truncated camera object, for a Quad tree system.

For the Quad Tree system, I think that the intersection between truncations and GameObject AABB is enough, so you don’t even need to know exactly the order of Plane in the array in order to calculate it. You can simply use GeometryUtility.TestPlanesAABB .

+3
source

Order: left, right, lower, upper, middle, distant.

+2
source

Source: https://habr.com/ru/post/1480262/


All Articles