Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -768,8 +768,9 @@ class FlxSprite extends FlxObject | |
#if flash | ||
if (simpleRender) | ||
{ | ||
_flashPoint.x = Math.floor(_point.x); | ||
_flashPoint.y = Math.floor(_point.y); | ||
// use fround() to deal with floating point precision issues in flash | ||
_flashPoint.x = Math.floor(Math.fround(_point.x)); | ||
_flashPoint.y = Math.floor(Math.fround(_point.y)); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Gama11
Author
Member
|
||
|
||
camera.buffer.copyPixels(framePixels, _flashRect, _flashPoint, null, null, true); | ||
} | ||
|
4 comments
on commit 54f5780
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not rounding it only for rendering?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind* i'm on a phone. Sorry.
Will this fix the camera too? Some were issuing camera jittering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No... funnily enough, the initial fix in updateMotion()
kind of fixed the camera jittering (#797).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the camera why not frounding the target's position so?
Do we need both
Math.floor
andMath.fround
here? I would imagine one would be enough?