- Home /
GameObject Colliding with Object Edges
I am trying to make an endless runner similar to this.
My problem is that when my player travels onto a new piece of "land," it slows down as if it is hitting the edge of the new land.
The player is a cube with a box collider and rigidbody and the land pieces are cubes that are 15 wide, 1 tall and 50 long, also with box colliders. In my script that instantiates the land as my player moves forward, I set the y value of each new piece of land to 0.0f, so they should all be at the same height.
I have made a Physics Materials with zero friction and put it on the land, but the problem only occurs when my player goes onto a new piece of land.
Also, I can't have the Player not use gravity and "float" above the land because it needs to be able to fall off the sides.
I am very sure that the player is hitting the lead edge of the new piece of land, but all of the lands are set to the exact same y.
Thanks for any help!