How to increase sprite display size

I want to change the size of the sprites on screen, without actually changing the original .png size. Can I do this.

screenshot: https://i.imgur.com/m4XjXDD.png

Yep, there’s a couple overloads of SpriteBatch’s Draw method you can use. One takes a destination rectangle. It will scale the sprite to whatever size you specify in the destination rectangle. Another overload allows you to specify scale as either a float (for scale in both width and height evenly), or as a Vector2 (for independent control of width and height scaling).

Keep in mind that any scale operations you do to the visual sprite, you’ll have to do mathematically on your own for any hit detection you do :slight_smile:

1 Like