Endless runner tilemap collision problem

Hi,

So Im still working on the endless runner idea and Im starting to work with tilemap segments

I created a tilesource

and added a collision group called “terrain”

Then I created a tilemap that uses the tilesource above. The layer z is 1

Now I use it in the segment.
Theres a game object called tiles that has the tilemap and a collision object. I set the collisionobbject: collision shape to the tilemap. I set the group to “terrain” and mask to “ship” as I do with other game objects (for example the pipes).

The ship doesn`t collide unless I add a custom box shape and then it works. The tilemap compontent z is 0 and game object z is 1 (same as ship z)

This is probably something stupid but I would really like some help with that :smile:

Cheers,
trikk

1 Like

Does it look right if you turn on physics debug? It’s pretty easy to accidentally move the tilemap component and not the whole game object causing the physics to offset.

1 Like

Hi,

I checked the “debug” for physics and it looks like the colliders are not there.
I did however delete the game object and recreated it and after setting the collision shape to the tilemap I still don`t see the collider anywhere on the map

Funny thing is if I set the collision object type to dynamic, the tiles get pulled down by gravity

1 Like

It sounds like the collision is there, just heavily offset.

Edit: or maybe not. Check next post.

1 Like

Oh, btw. Did you paint the tiles in the tilesource that should belong to “terrain”? I checked the doc and it is inclear on that point.

1 Like

That was it.

I believe the tutorial could use some more explanation on this matter

Cheers and thanks!

1 Like

I agree. It’s not clear at all. I’ll fix that.

1 Like