---
name: "BIS_fnc_boatRack01AdjustZOffset"
type: function
status: ok
groups: ["Boat Recovery"]
arma3_since: "1.84"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_boatRack01AdjustZOffset
revid: 379547
updated: 2026-10-31T13:43:34Z
---

# BIS_fnc_boatRack01AdjustZOffset

*Function · Boat Recovery · Arma 3 v1.84*

## Description

Part of the boat recovery system: raises or lowers the boat rack's cargo bay to suit the loaded boat, so that different boats do not clip into the rack.
It reads two entries of the rack's `CfgVehicles >> class >> BoatRecoverySystem` config class:

- `cargoBayAnimationSelection` - name of the animation that moves the cargo bay, e.g. `"CargoBay_Move_Z"`
- `supportedVehicleOffsetsZ[]` - list of `{ "boatClass", offset }` pairs, e.g. `{ { "C_Boat_Civil_01_F", 0.55 } }`

It then instantly animates the cargo bay to the offset of the boat's exact class ([typeOf](../commands/typeOf.md), inheritance is not checked), or to 0 if the class is not listed.

The function is called when the "Recover Boat" hold action of [BIS_fnc_boatRack01ActionAdd](../functions/BIS_fnc_boatRack01ActionAdd.md) has loaded a boat, and by [BIS_fnc_boatRack01InitAdjustZOffsets](../functions/BIS_fnc_boatRack01InitAdjustZOffsets.md) for a boat loaded at mission start. It does nothing if either object is [objNull](../commands/objNull.md).

## Syntax

```sqf
[boatRack, boat] call BIS_fnc_boatRack01AdjustZOffset
```

**Parameters:**

- `boatRack`: [Object](../topics/Object.md) - the boat rack
- `boat`: [Object](../topics/Object.md) - the boat loaded on the rack

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

Load a boat onto a rack by script and adjust the rack to it, as the hold action does:

```sqf
if (myBoatRack setVehicleCargo myBoat) then
{
    [myBoatRack, myBoat] call BIS_fnc_boatRack01AdjustZOffset;
};
```

## See also

[BIS_fnc_boatRack01Init](../functions/BIS_fnc_boatRack01Init.md) · [BIS_fnc_boatRack01InitAdjustZOffsets](../functions/BIS_fnc_boatRack01InitAdjustZOffsets.md) · [BIS_fnc_boatRack01ActionAdd](../functions/BIS_fnc_boatRack01ActionAdd.md) · [setVehicleCargo](../commands/setVehicleCargo.md)

<sub>Source: [BI Community Wiki — BIS fnc boatRack01AdjustZOffset](https://community.bistudio.com/wiki/BIS_fnc_boatRack01AdjustZOffset) (revision 379547).</sub>
