Hey there, I’m working on some code that relies on having an accurate bounding box which I grab from the renderer. My issue is that the bounding box for whatever reason was sized to be quite larger than the sprite, and so the code is kind of messed up because of it. Here’s a pic
As you can see the Box’s area is much larger than the sprite (As well as the associated colliders). What I would like to do is resize that bounding box so that it fits the sprite’s dimensions. If I try to manually resize it using the mouse it actually resizes the entire object. I’m a little lost as to what to do here, any ideas?
In inspector, under Sprite Renderer of your image, char, whatever, click on what ever is populated in your Sprite box. In your case it’s StandingMan. This should pull up in your Assets list either an Import Settings, or a image from an Animation strip your using. (if import skip next sentence). If its an image from an animation strip, click the right arrow on strip to condense, and then click on the strip now as a whole. In the inspector, under Sprite Mode, there should now be a Sprite Editor button. This will take you to the sprite editor screen, in which you can resize the boundary box. In sprite editor you can also custom move the pivot point.