Sprite Size Inconsistency

0 favourites
  • 6 posts
From the Asset Store
A versatile and wide-ranging selection of large to medium-sized creature sounds.
  • Hello,

    Does anyone know why sprites that play animations have height and width values different from that frame's actual image size? There's no scaling in effect. Sprites that are just static images display their height and width correctly in the debugger.

  • These are called floating point errors. Unfortunate result of how computers do math pretty much.

  • Scroll down on the properties and click "Make 1:1" to correct that.

    Typically you shouldn't get values like that. I've gotten decimals like that when I change sizes of scaled objects or something like that. But I don't understand how that occurs for unscaled objects.

  • These are called floating point errors. Unfortunate result of how computers do math pretty much.

    I figured as much, it's pretty obvious it's some sort of rounding error. I think it may be a sub-bug in a bigger project-specific bug I'm combating, so I'm trying to find the reason why.

    If the Width value of X frame in Animation Y on Sprite Z is 173 pixels, it should always be 173 pixels... If it was consistently rounded incorrectly, I could work with that (.1 + .2 = 0.30004)

    The longer the animation plays, the more the number changes. The first playthrough actually has correct values. I'm filing a bug report, I was able to re-create in a .c3p with nothing but a single sprite.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Scroll down on the properties and click "Make 1:1" to correct that.

    Typically you shouldn't get values like that. I've gotten decimals like that when I change sizes of scaled objects or something like that. But I don't understand how that occurs for unscaled objects.

    A R0J0hound reply usually means my problem has been fixed. Unfortunately I just dragged the sprites in, so they were already 1:1. I still smacked that button just to be safe but I still have the same issue.

  • Issue: github.com/Scirra/Construct-3-bugs/issues/5895

    Each frame in the sprite's animation has a different size, and origin image point location. That's the only thing I can think of that may be causing this issue, although I don't have any theories as in why.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)