Unit 3 Lesson 27 - coding issue

Each time we hit one of the enemies it comes out and goes diagonal instead of going straight across the screen. My student has tried different coding but nothing is working. Any suggestions on how to fix this problem would be greatly appreciated.

Colliding still keeps the velocity to you would have to write some code that makes the velocity 0 but keeps the same speed regardless of what the sprite hit.


They are using the “bounce” collision block. If you read the documentation on that block, it mentions that both sprites directions are changed with that collision. They might want to look at the other collision options and see if one of those is better suited to what they want to happen.

For example, if they used bounceOff, instead of bounce, it stops the enemy sprites. Could they figure out what to do after that?

Good luck!