M
MarceloP
Guest
Hey guys, it's me again.
Well, I've noticed a pretty weird problem and I think it is related to my previous unanswered ticket/problem, which has the number: 143039, and was submitted in April.
The fact is that after doing some tests I came across a bug related to scaling. When I scale an odd sized sprite, I get error propagation with respect to the center of my sprite.
Let me explain it better thought a pic.
As you can see, my odd sized sprite is 55x55. When scaled to 200, it finds that the scale factor should be 3.6363637447. No problem until that, because, it is correct and the precision calculation will fix any problems.
But when it comes to my XOffset, which HAD TO BE REAL, we have a problem. Since I set my sprite origin to be in the center, it SHOULD be 27.5, not only 27. Therefore, after scaling, the 0.5 that was left off my center propagates by the scale factor, leaving me with an invalid xoffset of 98.18, instead of 100.
This simply won't happen to an even sized sprite, since the center will actually round correctly after the scale factor is applied.
From my point of view, what should happen is that the pivot should be allowed to be a REAL value in the IDE/game and, therefore simply round the x and y position before draw, the same way it already does with X and Y positions.
Not allowing the pivot (xoffset and yoffset) to be real values, leads to error propagation and may be the same issue with my other post/bug.
Any ideas? Should I simply report this, or this is a forced integer for a reason?
I'll wait for some answers before actually submitting this as a bug/ticket.
Thanks!
Well, I've noticed a pretty weird problem and I think it is related to my previous unanswered ticket/problem, which has the number: 143039, and was submitted in April.
The fact is that after doing some tests I came across a bug related to scaling. When I scale an odd sized sprite, I get error propagation with respect to the center of my sprite.
Let me explain it better thought a pic.
As you can see, my odd sized sprite is 55x55. When scaled to 200, it finds that the scale factor should be 3.6363637447. No problem until that, because, it is correct and the precision calculation will fix any problems.
But when it comes to my XOffset, which HAD TO BE REAL, we have a problem. Since I set my sprite origin to be in the center, it SHOULD be 27.5, not only 27. Therefore, after scaling, the 0.5 that was left off my center propagates by the scale factor, leaving me with an invalid xoffset of 98.18, instead of 100.
This simply won't happen to an even sized sprite, since the center will actually round correctly after the scale factor is applied.
From my point of view, what should happen is that the pivot should be allowed to be a REAL value in the IDE/game and, therefore simply round the x and y position before draw, the same way it already does with X and Y positions.
Not allowing the pivot (xoffset and yoffset) to be real values, leads to error propagation and may be the same issue with my other post/bug.
Any ideas? Should I simply report this, or this is a forced integer for a reason?
I'll wait for some answers before actually submitting this as a bug/ticket.
Thanks!