If sprite is touching, sprite reset

Student is trying to make the soccer ball reset to 200,200 once it hits the goal. Lines 123-140. Currently has is touching.

When the ball hits the goal the player (car) goes back to the starting position. The ball keeps moving instead of resetting.

Student has tried, bounciness, velocity, speed and direction.

Student Game

@leslie.dillon,

It looks like the ball is resetting, but the velocity isn’t being reset. If you set the ball velocity to zero in the “ballReset” function at the same time you are resetting it’s location to 200,200 it should stop moving until acted upon by the players again.

Hope this helps!

Mike

1 Like

Thank you! We will try that out today!