Closed lesquoyb closed 1 year ago
The issue here is not linked to the layers
but to draw
, as you are instructing OpenGL to draw two objects at exactly the same position, which he cant really do correctly. This cant be solved without an explicit translation in z in draw
(e.g. draw "coucou" color:#black at: location + {0,0,0.1};
). However, I understand the need to have more automated things, so I have added the possibility to define (in the preferences) the increment to add between two drawings and also two layers and I take it into account between layers as well. This normally fixes the problem you mention here that could occur between layers.
So, to summarise, if you write :
draw rectangle(10, 20) color:#blue;
draw "coucou" color:#black;
This will never be solvable automatically (i.e. unless you explicitly translate the second draw
)
But if you write :
display t type:3d {
species dummy { draw rectangle(10, 20) color:#blue; }
species dummy { draw "coucou" color:#black; }
}
Then GAMA can apply the increment (between layers) and it works nicely.
Describe the bug When displaying layers of flat objects one on top of the others, there are very often display problems arising. The parameter that add a small increment on z-coordinate seems to be useless. Here is an example model:
And just by zooming in/out we have that kind of displays:
In that case, it's ugly but still understandable. But in some models the order is just completely messed up which makes them hard to understand. For example take the model
Generalized Lotka-Volterra (Toy model).gaml
and force the first display to be 3d, here is what you get: while in 2d it looks like this: While it's probably not the only problem with that model, the order in which the items are displayed is a part of itTo Reproduce Steps to reproduce the behavior:
Expected behavior layers are stacked in the order they are created, like in 2d display
Desktop (please complete the following information):