We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone,
I'm working on a project where the user is first questioned about his relation to the city in which he or she lives, according to those answers a 3D model of a city is generated using AABB boxes from toxiclibs. The questions are answered by some controlP5 toggles and sliders, nothing too fancy.
The project is almost finished but I'm having a hard time connecting the value from the answers to the 3D model. The problem is that in order for the city to be generated only once, the instruction for it's creation are set in the setup() (it's just a couple of nested for's that create a simple matrix of buildings), but in order for the values to change in real time and to use map() to adjust the answers so the values are in scale for the 3D model these are updated in the draw(), so the variables are indeed changing (I'm watching them change in the console by printing their values) but the city is still generated with the default values from when the variables where declared.
I hope someone can point me in the right direction, maybe a different way of organizing the structure of my program I'm not aware of?
Answers
I just fixed it. If anyone arrives to the same problem:
I moved it to the draw() and used a: