make trail editor-safe

..I think
This commit is contained in:
Ronja 2022-01-26 21:23:16 +01:00
parent 4433e19b63
commit 5432879e81

View file

@ -438,6 +438,18 @@ class TrailSystem is ModifierSystem {
}
tick(delta) {
if(World.tag_has(_world, "edit")){
each{|entity, data: ModifierData|
if(!Transform.has(entity)) return
start = Transform.local_point_to_world(entity, 0, data.edge_length * -0.5, 0)
end = Transform.local_point_to_world(entity, 0, data.edge_length * 0.5, 0)
Draw.path3D(_draw, [start, end], _debug_edge_style, false)
}
Draw.commit(_draw)
return
}
//System.print("positions")
record_positions(delta)
//System.print("buffers")