Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | TizianRettig | |
Old Version | Published before Godot 3 was released. |
Hi, I am trying to make a simple 2D platformer but i am running in some issues.
I want to use a tilemap for my terrain but after converting my tiles into a tileset the hitboxes (StaticBody2D with CollisionShape2D or CollisionPolygon2D) seem to be offset by 16 pixels. I checked all scaling factors of the tilemap, tiles and hitboxes and none of them is scaled so I am confident that that is not the problem.
Does anybody have ideas what the problem could be or where I could set an global offset for my tilemap ?
Are any of the colliders offset? I found myself that not all coordinates are used to generate the tileset, and I ended up using CollisionPolygon2D everywhere.
Zylann | 2017-03-12 02:53
I dont think so - I even tryed offsetting a collider by hand to see if the outcome changes , but the hitbox didnt move at all after putting it 16pixels off the actual texture
TizianRettig | 2017-03-12 10:56
Your TileMap cell size is correct?
eons | 2017-03-12 14:11
That’s what I’m saying, offsetting colliders never worked for me, that’s why I used polygons everywhere because points can be offset.
Zylann | 2017-03-12 18:18
yes 64x64 like my tiles
hmm okay , yea i tryed polygons aswell but that didnt seem to make any difference
TizianRettig | 2017-03-12 23:34
If you can, share the tileset scene, maybe something is wrong there, like an offset on the root.
eons | 2017-03-13 15:53