DRONE COLLISION MESH
When making an aircraft there are a number of different collision meshes that need to be created. For the exterior model airframe, you need to create a mesh called DRONE_COLLISION_IN
. This is a rough collision mesh of the cockpit which prevents the cockpit free camera from moving outside, and in drone (showcase) mode it forces the display of the LOD0 of the cockpit as soon as the Drone penetrates the mesh. It is also used as a fallback collision mesh for panel interactions in the case where the PANEL_COLLISION
mesh is not found in the glTF.
IMPORTANT! This mesh should be in the LOD that is used/visible in interior view (usually LOD0), and the normals/polygons of this mesh must be oriented toward the inside.
Note that - because of its inaccuracy - there may be places in the cockpit where some depth issues appear.
When creating this mesh, "DRONE_COLLISION_IN
" must be the name of the root node of your collision mesh in your glTF.
The material used (in 3Ds Max using the SDK plugin) is the Invisible material type and the Collision Material flag must be checked:
In the code, the mesh is activated by retrieving the node that contains the mesh, and this node is found thanks to its name. Below you can see an example of the DRONE_COLLISION_IN
mesh as seen from the interior of the Airbus A320neo: