private _trans = _obj2 worldToModel [0,0,0];
[
_obj2 worldToModel vectorDir _obj1 vectorDiff _trans,
_obj2 worldToModel vectorUp _obj1 vectorDiff _trans
]
If position [0,0,0] is in the sea then the relative dir and up that is returned is correct but takes waves into consideration.
If you continuously call the BIS fnc attachToRelative function on two objects when [0,0,0] is in the sea you will see the object roll like it's on the sea.
I used this function on Arma 2 Chernarus, where [0,0,0] is in the sea.