2
votes

In a 2d isometric tilemap

I've given a player object a Rigidbody2d component and an isometric tilemap a Rigidbody2d, a Composite Collider 2d, and a Tilemap collider 2d.

I used a the Dynamic and not the Kinematic on my player while i used the Static option on my wall rigidbodies.

The code i used for my player movement is the one given by unity in their player movement in isometric tilemaps minus the two lines of code referencing their player animations script.

I made a separate tilemap for my wall colliders.

Basically,the wall colliders dont affect my player object at all.

I'm new to unity and might be missing something so obvious even google couldn't help

2

2 Answers

0
votes

First of all, make sure that the Z position of all your interacting game objects in your scene has the same value, it can be whatever you want.

If it doesn't works, try to use box collider 2D instead of Tilemap Collider 2D

0
votes

Try adding some colliders2D and removing the tilemap colliders, box or circle its your choice. BUT, if you do have a square/rectangular walls then you should use the box collider2D, and if you have any problems with that as I had some before try adding some sprite squares or circles in the project editor as when I tried to add sprites regularly through the hierarchy the colliders did not work for me.