• 2D
  • Blurry textures

In my 2D platformer I have created multiple preloaded sprite sheets for the player so he can swap out different armor on the same sprite without needing a ton of sprites or animations, I have a function that fires when picking up a piece of armor (area2D) and it works great until I pick up a 3rd item. Then the .png my code imports is blurry. Not so for the first or second item I get, only the third, and no matter what order I do it in! Is there a setting or something I can change to make it import via 2D pixel automatically in the game when my function fires?!

Some snipets of my player's code to show what I'm doing ....

onready var HelmSkin = preload("res://Assets/PlayerSprites/Helm.png")

var GotHelm = false

func _ready() -> void: $Area2D.connect("area_entered", self, "Upgrades")

func Upgrades(area: Area2D): if area.is_in_group("Helm"): GotHelm = true EquipmentHandler()

func EquipmentHandler(): if GotHelm == true and GotVisor == false and GotMask == false: headSprite.set_texture(HelmSkin)

You have to disable filtering on the image import settings. Click on the image in the asset library, then click the import tab on top left and deselect filter then press reimport.

Oh, I feel like such a fool! My problem was an oversight on my part! I know about selecting 2D pixel preset (which includes filtering disabled) and I did it to all my .png's...........or so I thought!

To save resources and use fewer sprites I created separate artwork for every combination of armor equipped/unequipped. But in my tired state I set the import preset for the armor image and also for the gauntlets image, but not for the armor and gauntlets only image. I was forgetting that they were together as one image instead of two, and I overlooked it!

But many thanks for your quick answer. Even though it wasn't exactly what my problem was, it got me looking in the right direction where I was able to discover my folly! Now my setup is working perfectly!