View previous topic :: View next topic |
Author |
Message |
clayasaurus
Joined: 21 May 2004 Posts: 857
|
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Tue Apr 17, 2007 2:26 pm Post subject: |
|
|
Ah, now I see it. Same here. I'll look into it.
Edit: Committed a fix. Should be better now. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Apr 18, 2007 8:35 am Post subject: |
|
|
looks good to me, thanks! |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Apr 19, 2007 9:17 am Post subject: |
|
|
I committed one test of the sprite in the sprite unittest (the pointTo test).
Also I noticed limitFPS does not really work how it should, as it allows for 'jumps' (I submitted a new ticket that tells how you can re-create these weird time jumps).
Also, to get pointTo to work properly, I had to comment out some of the pointTo code like...
Code: |
targetAngle = /*degreeToRadian(*/PI - atan2(argX-getX, argY-getY);//);
|
It doesn't work when targetAngle is in radians, for some reason. :-/ |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Thu Apr 19, 2007 10:05 am Post subject: |
|
|
Quote: | Also I noticed limitFPS does not really work how it should, as it allows for 'jumps' (I submitted a new ticket that tells how you can re-create these weird time jumps) |
See the comment on the ticket.
Quote: | Also, to get pointTo to work properly |
Can you explain the problem more? Yes, you have to remove the degreeToRadian conversion, but what is not working? |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Apr 19, 2007 10:31 am Post subject: |
|
|
Changes to arcunittest are in, also make sure to update arc svn as well.
This is the code in pointTo before I modified it, this code does not work because it is in radians, I suppose.
Code: |
targetAngle = degreeToRadian(PI - atan2(argX-getX, argY-getY));
|
I changed the code to
Code: |
targetAngle = PI - atan2(argX-getX, argY-getY);
|
and the code works fine like that. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Thu Apr 19, 2007 1:08 pm Post subject: |
|
|
Yes, the degreeToRadian was a bug, since its argument definitely is in radians already. Checking the change log, I see that it was added in one of Brix' patches. He saw the 'toRadians' function (which took a float and returned the value unchanged, but as 'Radians' - which was a strong typedef at that time) and mistakenly replaced it with degreeToRadian.
Stealthy bug, good catch! |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Fri Apr 20, 2007 10:47 am Post subject: |
|
|
I reopened the limitFPS ticket... it is still causing visible ticks for me. |
|
Back to top |
|
|
|