Hello,
I would like to Rotate multiple instances of same object continuously.
Here is the code I’ve written in enterFrame event.
for i=#objects,1, -1 do if(objects[i] and objects[i].x) then objects[i].rotation = objects[i].rotation+25 end end
My game is a multiscreen game. there are around 15-20 instances of the object that I am trying to rotate in enterFrame event. But at a time, there will be only 3-4 instances visible on screen. All other instances will be offscreen.
The above code works, but sometimes it does not rotate all the objects as enterFrame executes so quickly (around 55-60 FPS). So can anyone please suggest a better solution?