/// <summary> /// Returns the SpatialData instance representing the offset. /// </summary> public static SpatialData AttachWithOffsetTo(this ISpatial self, ISpatial newParent, Vector2 positionOffset, Angle rotationOffset) { SpatialData result = null; if (newParent != self) { result = new SpatialData() { Position = positionOffset, Rotation = rotationOffset }; result.AttachTo(newParent); self.AttachTo(result); } return(result); }