So, I have a player which runs at an increasing speed. I use a box collider for the player same for the ground.
My problem is that the player will get stuck in the ground at a specific point ( and if I get past it using jump it will get stuck at another specific point), always the same spots.
Depending on the speed I give to the player, the points where it gets stuck change.
I tried using a circle at his feet, but he starts bouncing ( very lightly) randomly. My player has continuous collision detection, though I tried with discrete and doesn’t change anything.
I generate ground by cloning one game object over and over again, and moving it by the width of the ground to right, up until a point.
if (transform.position.x < PointGenerator.position.x)
{
transform.position= new Vector3((transform.position.x + GroundWidth), transform.position.y, 0);
Ground = (GameObject) Instantiate(Ground, transform.position, transform.rotation);
}
After letting it run for a good amount of time, it didn’t generate any gap between the objects and it had the same axis X distance as it should have between any 2 object.
I couldn’t find any solution on the internet. I would be very grateful if you could help me out.