0

Can we make Tiled Layer Collisions work in a game based on Tiled Tile Layers rather than Tiled Object Layers?

Tried:

for object in self.map.tmxdata.objects:
            if object.name == 'Collision':
                Obstacle(self, object.x, object.y,
                         object.width, object.height)

Expecting:

for object in self.map.tmxdata.get_layer_by_name:
            if object == 'Collision':
                Obstacle(self, object.x, object.y,
                         object.width, object.height)
Rabbid76
  • 202,892
  • 27
  • 131
  • 174
Groot
  • 1
  • 1

0 Answers0