AsoboStudio / glTF-Blender-IO-MSFS

Apache License 2.0
139 stars 28 forks source link

Collision Meshes/Objects Don't Collide With Camera #155

Open Levijd opened 2 years ago

Levijd commented 2 years ago

Current Behavior

Collision meshes and objects appear to be exported, but cannot be interacted with in sim. Collision objects and meshes show up correctly when 'Simple Shape Collisions' and 'Mesh Collisions' are checked in debug, but the camera will not collide with anything including the WINDSHIELD_COLLISION mesh. This means that the camera in the cockpit can leave the cockpit and move through seats/panel/etc.

Perhaps collision meshes/objects are only for scenery and there is a different method to provide camera-object collisions?

Expected Behavior

WINDSHIELD_COLLISION mesh should prevent the camera from leaving the cockpit, and other collision meshes should prevent the camera from passing through the collision boundary.

Steps To Reproduce

Create a cockpit mesh. Create a WINDSHIELD_COLLISION mesh with collision material that is type Invisible with Collision Mesh checked. Create an empty cube with a 3D object as it's parent, and set Box Collision Gizmo is MSFS Collision Parameters. Export the model to GLTF and load in sim. Notice that the collision mesh and box show up in game when the debug options are checked, but when you right click and move the camera, it can pass through both the WINDSHIELD_COLLISION and the Box Collision Gizmo.

Environment

- Blender:3.1.2
- glTF-Blender-IO-MSFS:1.1.6 and latest main branch as of 2022-06-07

Anything else?

No response

btronquo commented 2 years ago

Hi, Can you send us a sample .blend please ?

Levijd commented 2 years ago

Cockpit-Stripped.zip Stripped cockpit with Box Collision Gizmo on each seat, Panel and Windshield collisions. All show in MSFS, none interact with the camera and it can fly through the collision boxes, panel, and windshield collision.