I want a rectangular node called “Start” to appear between the coordinates 1000×1000 and 950×950 once per simulation. For this I have the function “setRandomPosition
“
setRandomPosition(); { double x = uniform(950, 1000); double y = uniform(950, 1000); Start.setPos(x, y, 0);
}
which is initialized in the Main, On StartUp,setRandomPosition();
.
This is the only function at all.
Everything is compiled, but on execution, I get a StackOverflow with error: at_1_try.Main.setRandomPosition(Main.java:634). Error, while execution here
The ultimate goal is to create a random area as “spawn-point” with pedSource.
I can’t get any further… Does anyone have a solution available for this specific problem or a better method?
3