Function outside loop effecting rotation speed!! ?

BlitzMax Forums/BlitzMax Beginners Area/Function outside loop effecting rotation speed!! ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You are incrementing the global variable 'angle' every time you call rotateBalls. The more balls there are, the more you call rotateBalls and the more you increment 'angle' per frame.
You'll want to either have 'angle' be a field and not a global variable, or update 'angle' only once per frame (outside the 'rotateBalls' Method.
Side note: 'rotate' is a much better name than rotateBalls. You shouldn't repeat the name of the type as part of the method name, and in addition you're rotatin a single ball, so at the very least that would be rotateBall, not rotateBalls.