瀏覽代碼

FX2D: anim position relative

Tom SPIRA 5 年之前
父節點
當前提交
0ac6a46659
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hrt/prefab/fx/FX2D.hx

+ 2 - 2
hrt/prefab/fx/FX2D.hx

@@ -74,8 +74,8 @@ class FX2DAnimation extends h2d.Object {
 
 
 			if(anim.position != null) {
 			if(anim.position != null) {
 				var pos = evaluator.getVector(anim.position, time);
 				var pos = evaluator.getVector(anim.position, time);
-				anim.obj2d.x = pos.x;
-				anim.obj2d.y = pos.y;
+				anim.obj2d.x = anim.elt2d.x + pos.x;
+				anim.obj2d.y = anim.elt2d.y + pos.y;
 			}
 			}
 
 
 			if(anim.visibility != null)
 			if(anim.visibility != null)