/e 2: The bouncing apparently was caused by overlapping materials/shapes even though they were completely flat and the same height. Thanks to the snapping tool I got rid of the overlaps and now the ball rolls smooth!
Hello
I’m currently expanding a little on the Tutorial 1, in which you create a rolling ball game.
I’ve created a “Teleporter”. When the ball enters a Trigger zone, the ball’s position on the Z plane gets changed. The Ball’s X, Y position and rotation all remain unchanged.
After the ball’s position gets adjusted via this “Teleporter” he 7 out of 10 times bounces off the ground after continuing to roll a short while or starts to bounce immediately after the position change and I can’t figure out why he randomly starts bouncing.
The Y plane is level, it’s a flat surface and the same height at both positions.
Any ideas why the bouncing occurs? I have tried minimally adjusting the Y position because I thought perhaps the problem has something to do with friction but no luck with that approach either.
/e: perhaps I should mention that I use the standard gravity, friction etc. settings and the ball enters the “teleporter” usually at a “medium” speed.
The ground has no physics material applied to it.
Here’s the relevant code if that helps:
else if (other.gameObject.name == "TeleportSouth"){
TeleportToPosition1 ();}
void TeleportToPosition1 (){
float currentpositionx = gameObject.transform.position.x;
float currentpositiony = gameObject.transform.position.y;
Vector3 teleportPosition1 = new Vector3 (currentpositionx, currentpositiony, -50.0f);
rigidbody.position = (teleportPosition1);
rigidbody.rotation = (Quaternion.identity);}