0
\$\begingroup\$

I am trying to make a 2d game but my player falls through the tilemap every time.

My tilemap collider doesn't seem to show up.

What is going on and how do I fix this?

The first image is rigidbody currently falling through the tilemap and the tilemap. The second image is rigidbody currently falling through the tilemap and the rigidbody. rigidbody currently falling through the tilemap and the tilemap

rigidbody currently falling through the tilemap and the rigidbody

\$\endgroup\$
3
  • 1
    \$\begingroup\$ How did you configure collision on the white tile you're using? \$\endgroup\$
    – DMGregory
    Jan 5 at 22:56
  • \$\begingroup\$ the white block is the tilemap with a tilemap collider and the red square is the rigidbody with a box collider \$\endgroup\$ Jan 6 at 3:12
  • 1
    \$\begingroup\$ That's already stated in your question, and not what I asked. I asked how you configured the collision representation for the individual tile that you've painted into the tile map. \$\endgroup\$
    – DMGregory
    Jan 6 at 3:13
0
\$\begingroup\$

The issue is with the sprite itself

to fix I clicked the sprite copy that unity creates whenever you first import a sprite went to collider type and selected grid. this allowed the tilemap collider to work on the white block and any new tiles painted

\$\endgroup\$
1
  • \$\begingroup\$ That's not a copy of the sprite, that's a tile. The tile references the sprite, but also has other information like collision. \$\endgroup\$
    – DMGregory
    Jan 6 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.