0 votes

Hi guys,

Just trying to get to grips with Godot but have been having the most difficulty with collisions and using the grid.

I downloaded a tileset to test and made Sprite -> StaticBody2D -> CollisionShape2D for each tile with the collision shapes covering them adequately. However, when I export it as .tres and try and use it through TileMap, it takes up four (64x64) squares while the sprite itself only occupies the top left. The StaticBody2D itself only takes one square.

Furthermore, when I test the tiles my sprite floats a significant margin above the tiles despite the collision shapes being correct (?).

I've tried to find a resource that explained this but no luck so far, some pictures included for clarity. Apologies if this is too basic for this forum..

Many thanks!

View in .tscn

View in World

View in testing/weird hitbox

in Engine by (29 points)

First thing I'd check is for accidental scaling, either in the tileset source scene or of the TileMap itself. If you can post a link to the sample project, it would probably be easier for someone to troubleshoot.

Also, make sure the cell size property is set to 32x32.

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.