Why are my tile collisions off?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MHarm
:warning: Old Version Published before Godot 3 was released.

Hello,

I am running into some tile collision issues. Here is how I set up my tileset in a scene before converting it into an .xml file. I should note my CollisionPolygons all have Pos (0,0) and Scale (1,1). Image1

Now when I use this exported tileset in a TileMap node to paint my game world, I get some weird collision boxes. This is what my game will look like with visible collisions turned on: Image2

Any ideas?

Did you tried with StaticBody2D instead of using Area2D for the tiles?

Zylann | 2016-09-15 00:17

Yes I am using StaticBody2D

MHarm | 2016-09-15 01:37

Oops, you’re right. They changed the icons in 2.1 and the new one looks a bit like the old Area2D :s

Zylann | 2016-09-15 19:51

:bust_in_silhouette: Reply From: MHarm

Got it figured out. My StaticBody2D nodes were at Pos (8,8) and Scale (0.25) which caused the collision areas to be too big. Setting all StaticBody2D nodes to Pos(0,0) and Scale(1,1) (as well as the CollisionPolygons) fixed the problem.