Leviathan Grab Point - NeisesMike/VehicleFramework GitHub Wiki

The ModVehicle class has a field:

public virtual GameObject LeviathanGrabPoint => gameObject;

By default, it returns the vehicle's game object. That's the whole vehicle. The Leviathan Grab Point is used to tell Reaper Leviathans where to grab your vehicle. So in the (quite common) case where the origin of your vehicle is near its center, this can result in the Reaper's mouth going all the way through and into your vehicle. That's undesirable because it looks bad and can cause some weird collision behavior.

For that reason, you can assign a different Leviathan Grab Point. To do so, you must add a new Game Object to your vehicle prefab that has its center where you want the Reaper to grab. The Odyssey happens to not use this feature because its model was setup just so. But you can see where its grab point is here:

https://github.com/NeisesMike/SubnauticaAtramaVehicle/blob/main/Images/wiki/hierarchy/odysseyCenter.png

For reference, imagine how the Reaper grabs the Seamoth. The grab point for the Seamoth is about where the player's head is. So that's about a meter from the glass canopy.

Then when you write your vehicle mod, you must override the Leviathan Grab Point like this:

public override GameObject LeviathanGrabPoint => transform.Find("path/to/GrabPoint").gameObject;

If done correctly, the Reaper should center its grab action on the new GameObject. If you had problems with the Reaper going inside your vehicle before, this should resolve it. But you may need to do some trial and error to get it just right.