Layer setup issue?

Hi there,

When I play the game my character falls from the ground, I am following the course but it seems I’ve lost track somewhere.

I

I assume layer setup is same as rick does on the course but not sure why my character is falling from the ground even though I’ve set it correctly :sweat:

Would you help me to find the issue here? I am not facing any compiler errors and

Thanks,

Hi,

Have you already checked to which layer the ground is assigned? It must not be the ‘BG’ layer.

The Player is assigned to ‘Player’, which is correct.

If the issue persists, check the collider shape of your ground collider. Maybe there is a gap, or maybe it looks odd. In that case, disable the tilemap collider and enable it again to force Unity to recalculate the collider shape.

Did this help? :slight_smile:


See also:

it is assigned to Platforms Tilemaps layer but my character is snapping to the above even though I’ve erased the roof…


I’ve tried to disable tilemap collider and enable it again but player was still snapping to out of cam and above polygon collider 2d on background tilemap.

I’ve managed to gain control of the player for a second there after disabling the polygon collider 2d component but after enabling it again my character began to fall over the ground again :sweat: I am really could not understand it actually :face_with_thermometer:

Well, falling and snapping are two different problems. The snapping could be caused by the collider which we use in the cinemachine confiner. You figured that out yourself. :wink:

Try to put that PolygonCollider2D onto your ‘BG’ layer, or tick ‘IsTrigger’. Did this fix the problem?

nope my player still falling from the ground when I hit play :roll_eyes:
I’ve tweaked order layer for tilemapcollider 2d on platforms tilemap but the player still falling from the ground.

What I am missing here?

A trigger collider is not ‘solid’. From what I see in your screenshot, the platform collider is a trigger collider because ‘Is Trigger’ is ticked in the CompositeCollider2D component. Untick the box and test your game again.

it is still not working

any other suggestions?

Could you please fill out our form and send me your zipped project (without the Temp and Library folders)? I’d like to take a look into this. Don’t forget to add a link to this thread.

When you are done, drop me a line here, so I can check our server.

Thanks Nina I’ve shared the file and fill out the form as well

Your player is colliding with the background physics 2d in project setting, uncheck that and try it. you made a screen shot of it on your initial post, that is why the player is colliding with the outside of the tile map.

image

Hope this helps…

The BG tilemap collider on the BG tilemap object is meant to keep the camera inside the level. I too forgot about that when i set up other objects. :stuck_out_tongue:

image
@consummatumest

I’m afraid that’s not the solution. I was hoping that it will work but no luck there.

Did you uncheck it and it still doesn’t work?

Try disabling the BG polygon collider and see what happens… If your player spawns correctly then it has to do with the BG collider, it will help simplify, and find anything related to that collider.

Do you have multiple colliders on your player and its children objects? if so, are the children objects set up to the correct layer even though the parent should be the primary. Might be good to check?

If you have a discord account we can connect on there, and do a screen share and figure it out together… My username is : bryanblaze00 send me a message or friend request.

1 Like

mine is boredcook I’ve sent you a friend request :grinning:

1 Like

Thank you so much @BryanBlaze00

He take a look at the file and after turning off the Composite Collider 2d’s trigger on platform’s tilemap it worked like a charm :pray:

1 Like

@consummatumest You’re welcome man! I’m glad it is working… Screen share is seriously the best way… Haha :stuck_out_tongue: I do have a long history of remote support under my belt as well…

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms