• 2D
  • how do i get rid of the white box around my characters sprite?

A bit more info would be helpful, or a screenshot in this case.

Looking at the image, you probably need to replace the white pixels with transparent pixels.

If you open up the image in the image manipulation program of your choice (I use Gimp) and use the erase tool to remove the white pixels so they are transparent. How this is done varies depending on your image manipulation program, but most support have transparency support.

Once all of the white pixels around the character are transparent, you will need to export/save the image in a format that supports transparency. .png files are generally what I use as it supports transparency and is a lossless format. Do not save the file as .jpg, as it does not support transparency and will replace the transparent pixels with either white or black.

Then you should be able to use the exported image in Godot and the character will be shown without the white pixels.


Another option is using a shader to remove the white pixels around the character. The shader itself is not too hard to write, it just needs to check if the color of the pixel is equal to white, making it transparent if it is.

However, I would not recommend this solution without the outline around the character to another color, as using white as the transparent color in a shader will also make the white in character's eyes transparent. This method also isn't quite as flexible, as it requires all transparent pixels to be the exact same color.