diff --git a/src/data/position/Relative2DPosition.ts b/src/data/position/Relative2DPosition.ts index 24d075da9..0e88367e3 100644 --- a/src/data/position/Relative2DPosition.ts +++ b/src/data/position/Relative2DPosition.ts @@ -11,8 +11,8 @@ import { RelativePosition } from './RelativePosition'; export class Relative2DPosition extends RelativePosition { constructor(referenceObject?: any, x?: number, y?: number, unit: LengthUnit = LengthUnit.METER) { super(referenceObject, new Vector3(), unit); - this.referenceValue.x = unit.convert(x ? x : 0, LengthUnit.METER); - this.referenceValue.y = unit.convert(y ? y : 0, LengthUnit.METER); + this.referenceValue.x = x ? x : 0; + this.referenceValue.y = y ? y : 0; } @SerializableMember({ diff --git a/src/data/position/Relative3DPosition.ts b/src/data/position/Relative3DPosition.ts index ba2e0614d..e5469524d 100644 --- a/src/data/position/Relative3DPosition.ts +++ b/src/data/position/Relative3DPosition.ts @@ -10,7 +10,7 @@ import { Relative2DPosition } from './Relative2DPosition'; export class Relative3DPosition extends Relative2DPosition { constructor(referenceObject?: any, x?: number, y?: number, z?: number, unit: LengthUnit = LengthUnit.METER) { super(referenceObject, x, y, unit); - this.referenceValue.z = unit.convert(z ? z : 0, LengthUnit.METER); + this.referenceValue.z = z ? z : 0; } @SerializableMember({