Ball bounces when teleported
Hi! Im making a game where you launch a ball on a target, and if you hit, you get teleported back and launch again. However, when the ball gets teleported back, it bounces off, or just rolls backwards. How can i stop this from happening? Here is the teleporting code:
private void OnCollisionEnter(Collision collision)
{
// If collision is with Wall
if(collision.gameObject.tag == "Wall")
{
transform.position = new Vector3(0, .5f, -5);
}
Comment
Your answer
Follow this Question
Related Questions
How to create a Knockback vector2 directions script (c#) 1 Answer
Sumo Physics Bounce Question 0 Answers
Bounce between two exact points 1 Answer
C# Loop script,C# LOOP SCRIPT HELP NEEDED! 0 Answers
Raycast direction change problem 0 Answers