While I’ve not experienced what you’re referring to (I’ll be able to run it later), I can tell you I’ve had some very strange behavior with modification to the rotation of graphics.
The value in the rotation property is quite… odd. It really flips all over the place in terms of sometimes being from 0 to 360 and sometimes operating from 0 to 180 then -180 to 0. It was causing all kinds of problems for me when I was trying to determine when my original 0 rotation was pointing into a specific area… so I wrote a “fixRotation” function which clamped everything to be from 0 to 360 every time I “use” the rotation value. It may not be pretty, but it served my purposes:
if (\_spin.rotation \< 0) then
\_spin.rotation = 360 + \_spin.rotation;
end
if (\_spin.rotation \> 360) then
\_spin.rotation = \_spin.rotation - (360 \* math.floor(\_spin.rotation / 360));
end
This insures that rotation is always 0-360 (and has no side-effects of flipping things about since it’s simply applying the correct rotation in a 0-360 range… nothing changes on screen because of this). My point? Well, perhaps there’s some oddity building up with your value of rotation because you never clamp it?
In my case, when my mouse was doing the rotation of my object, the value of rotation was very erratic once I “went negative” (it would start out as -1, -2, -3 and suddenly become 356, 355, 354… but if I rotated back it would change to -3 again) or once I crossed from 180 to more than 180… just really weird numbers like it was trying to do some conversion but half the time it did it one way and half the time another.
At any rate, just thought I’d toss this out there in case it made a difference.
Scott [import]uid: 5659 topic_id: 909 reply_id: 2108[/import]