This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

danpost
danpost presents ...

2022/2/18

Bounce Demo

Click buttons to view class codes.

Use "escape" or "x" to return to demo.

Use "up" and "down" keys or drag handle on right to scroll text during code viewing.

1636 views / 21 in the last 7 days

1 vote | 0 in the last 7 days

Tags: demo danpost bouncing source-text

This scenario is a member of: Demos by danpost


Your browser does not support the canvas tag.
Roshan123Roshan123

2022/2/18

May be you should rename it to Irregular shape collision demo. I remember when I was searching for a demo to see how perfect collision works and now here it is
danpostdanpost

2022/2/18

"Irregular Shape Collision Demo" is a bit long and could be misleading, here. However, the documentation does show what is needed to bounce off any smooth surface (curved or not). Complications do occur at bounce points that do not have a normal to the surface and finding the bounce point itself (to find the correct normal to use) could be tricky with irregular surfaces
lehrerfreundlehrerfreund

2022/2/19

Great! Would you mind to share the code?
danpostdanpost

2022/2/20

@lehrerfreund, run the scenario and click buttons at top left corner.
lehrerfreundlehrerfreund

2022/2/22

Ah - could have found this out on my own … thanks!

Want to leave a comment? You must first log in.

Who likes this?

lehrerfreund