1
0
Fork 0

Fix Tanker when no offset specificed

This commit is contained in:
Richard Harrison 2020-01-10 20:00:55 +01:00
parent 419706e7ce
commit e9b12b302f

View file

@ -250,9 +250,19 @@ var Tanker = {
me.elevN.setDoubleValue(elev);
# Determine if any of the contact points are in contact
var offset_x = refuelOffsetX.getValue() or 0;
var offset_y = refuelOffsetY.getValue() or 0;
var offset_z = refuelOffsetZ.getValue() or 0;
var offset_x = 0;
var offset_y = 0;
var offset_z = 0;
if (refuelOffsetX != nil)
offset_x = refuelOffsetX.getValue() or 0;
if (refuelOffsetY != nil)
offset_y = refuelOffsetY.getValue() or 0;
if (refuelOffsetZ != nil)
offset_z = refuelOffsetZ.getValue() or 0;
var roll = acRoll.getValue() * globals.D2R;
# Determine contact position