Hi guys,
So im spawning a level piece, which, after being spawned, moves along the z axis.I store the objects Z position, then compare it to -100, the idea being, when my object Zpos hits -100,it is now equal in the float compare,so it fires off the actions to despawn,and spawns a new piece, and the whole cycle starts again.
At the moment, it mostly works, however, the float compare sometimes doesnt call the equal to event, possibly due to frame rate, so i use "greater than" also.
This works, but i end up with little gaps between level pieces now.
Very unsure of how to fix it.
Originally i was just using colliders, so when the level piece hit them, it would do the same, but i thought doing it this way would be less expensive on resources for mobile.
Is there any work around anyone knows? Is the float compare a bad idea?
Thankyou kindly.
Jason