Hello everyone.
In my game, I’m using this.entity.rigidbody.teleport(this.startPosition); for resetting the basketball position once it goes out of screen. But the problem is the ball moves forward or backward when after resetting like it has the previous momentum before the reset.
I also tried disabling the rigid body and set the player position to the initial position and enabling the rigid body, but it didn’t work.
When I tried a code change in your project, the angular velocity wasn’t set to ZERO and the ball started to roll after the teleport. I think that was the case with that bug.
Yes, and also that I was resetting the velocity and calling the teleport() after 2 second delay. When I removed the delay and set both the velocity to zero, it works fine. Thank you