Răsfoiți Sursa

SplineMover: fix offset

lviguier 1 an în urmă
părinte
comite
a0187d997f
1 a modificat fișierele cu 1 adăugiri și 6 ștergeri
  1. 1 6
      hrt/prefab/l3d/SplineMover.hx

+ 1 - 6
hrt/prefab/l3d/SplineMover.hx

@@ -44,12 +44,7 @@ class SplineMoverObject extends h3d.scene.Object {
 		var pt = state.point;
 
 		for (c in movables) {
-			if (c.follow == null) {
-				// We attach the object to this parent because moveAlongSpline already includes the transform of
-				// this spline
-				c.follow = this.parent;
-			}
-			c.setPosition(pt.x, pt.y, pt.z);
+			c.absPos.setPosition(pt.toVector());
 			if( prefab.orientTangent ) c.setDirection(state.tangent);
 		}
 	}