0

So, I've made a very simple game, which all you basically do is glide through the terrain and avoid the obstacles (I haven't implemented obstacles yet). And I've encountered a very strange problem. When ever I hit the fifth chunk, the player starts to flip:

enter image description here

Can anybody help me find what the problem is and how can I fix it?

Edit: I solved it by using creating a physics material with 0 friction annd applied it to both the chunk and the player.

Marc2001
  • 281
  • 1
  • 3
  • 12
  • 1
    Can you share your code how do you instantiate the chunks and how do you move your Player? – Ali Kanat Jan 31 '19 at 12:07
  • 2
    +1 on what @AliKanat said, and I believe it'd be helpful to see what gameObjects are child of the fifth Chunk – Kokolo Jan 31 '19 at 13:55
  • It looks like the 5th chunk is a bit lower than others, could you select both the 5th and 6th chunks? – shingo Feb 01 '19 at 03:23

1 Answers1

0

This could be an issue with your colliders being just a tad too big. check the dimensions of your player's box collider and see if it is bigger than your player. If so make it fit to just inside the outer edges of the player box. Also, unless you ever plan to flip the player intentionally, You could always just apply a constant downward force (Rigidbody + gravity usually will suffice) to keep this from happening. Hope that helps!