0 votes

I try Atlas Importer but the pixel is not good blurry, So I disable Mipmaps, Repeat, Filter no luck

I was thinking of using

this code but it takes alot of time to put Rect2()
var texture = {'rock': [Rect2(x, y, w, h)],
               'tree':[Rect2(x, y, w, h)]}

func _ready():

EDIT: I try importing again with Atlas Importer again blurry but when i try restart godot engine BOOM working no more blurry :D

in Engine by (50 points)
edited by

1 Answer

+1 vote
Best answer

If your Spritesheet has sprites of the same size, you can just set the quantity of sprites horizontally or vertically using set_hframes() or set_vframes(). If your sprite sheet (for example) has 10 columns of sprites callset_hframes(10)and the Sprite node will calculate the frames. After that, just use the method set_frame(n) to tell the Sprite node which one to show. Notice that n goes from 0 to your number of sprites ordered by columns.

Then your dictionary will be:

var textures = {
    rock = 0,
    tree = 1

func _ready()
by (697 points)
selected by

Thank you for your answer :D

Your welcome! ;)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.