Ver Fonte

trails : fix trails not working when going too fast at start

lviguier há 1 ano atrás
pai
commit
d161a5c85e
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      hrt/prefab/l3d/Trails.hx

+ 5 - 0
hrt/prefab/l3d/Trails.hx

@@ -469,6 +469,11 @@ class TrailObj extends h3d.scene.Mesh {
 		shader.setPriority(-999);
 
 		updateParams();
+
+		if (trails != null && trails.length > 0) {
+			var pos = this.getAbsPos();
+			addPoint(trails[0], pos.tx, pos.ty, pos.tz, ECamera, 1.0);
+		}
 	}
 
 	#if editor