#79611 - ProblemBaby - Fri Apr 14, 2006 2:49 pm
Hello
Iam trying to rotate an object around a point. It works, but its so unsmooth it jumps around the rotcenter.
Is it something thats wrong with the code?
or any ideas how I can make it more accurate.
sx, sy: rotation point relative to the center of the object
- 32 is because its a 32x32 object Iam drawing
my COS and SIN table have the format 1:3:12
Thanks
Iam trying to rotate an object around a point. It works, but its so unsmooth it jumps around the rotcenter.
Is it something thats wrong with the code?
or any ideas how I can make it more accurate.
sx, sy: rotation point relative to the center of the object
- 32 is because its a 32x32 object Iam drawing
my COS and SIN table have the format 1:3:12
Code: |
f16 cos = COS(Angle) >> 4; f16 sin = SIN(Angle) >> 4; Object.x = x - 32 + (((cos * sx) - (sin * sy)) >> 8); Object.y = y - 32 - (((sin * sx) + (cos * sy)) >> 8); Object.pa = cos; Object.pb = -sin; Object.pc = sin; Object.pd = cos; |
Thanks