Browse Source

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

lviguier 1 year ago
parent
commit
d161a5c85e
1 changed files with 5 additions and 0 deletions
  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