Unity - Polygon Collider 2D does not follow my character


I'm practicing with unity , and I was following a tutorial that explained step by step how to develop a simple platform game.

The problem I have is that by designating a Polygon Collider 2D to my character, he does not follow it when making a jump, causing him to lose the game at all times. The trigger works perfectly.

I'm not using the gravity properties of unity , the jump is entirely an animation.

asked by Eduardo Herrera 26.07.2018 в 22:16

2 answers


You can modify the collider during the animation, so it will only affect the animation, I leave you a gif so you can see how it would look link of the gif

answered by 26.07.2018 / 22:49

What you have to do is modify the Y of the player object, the collider should be the player's son, so he will inherit the changes of position of the father.

Make sure that in the animation that you are mounting there is no blank space on the bottom, so you are not changing the Y display, just execute the change of the animation giving the feeling that you are jumping but in reality the player object does not move.

answered by 27.07.2018 в 11:51