Hello, in my sketch i continuesly add PShape childs to a group, but once i draw the group the newly added childs wont show up anymore, does anyone have a solution for this, or a workaround. I’d be very much appreciated.
below is an example, in my original code the problem occurs when i temporary add a child to the group when i press the mouseButton. perhaps this info is usefull.
Also, in my original code the group is quite large, and instead of just not showing the newly added childs, it crashes and gives the following error ‘BufferOverflowException’. Its also in 3d, but i dont know if that matters…
PShape shape;
void setup(){
size(400, 400, P2D);
frameRate(1);
shape = createShape(GROUP);
}
void draw(){
shape.addChild(createShape(RECT, random(0, width - 20), random(0, height - 20), 20, 20));
if(mousePressed) shape(shape);
println(frameCount);
}