Hi guys,
I’m hitting my head against a brick wall right now, long day.
Anyway, lets say i have an array of positions, which are stored on Start (initial instantiated positions of objects). I want to check whether or not these positions have changed. If a positions has changed, fire an action, and then set the initial position to the new position.
Currently i have an array which stores all these positions on one object. This object checks their current position against their initial positions in a for loop. Extremely inefficient i know.
Would there be any other way i could go about doing this? Another method that i might be able to try is to keep the check local to each position, and check if its current position is different to it’s old position → send message to manager, then fire event.
But would 1000 objects checking themselves against a Vector3 then sending a message be more efficient than one object checking 1000 objects against an array of 1000 Vector3’s?
Thanks!