Javascript ball collision

后端 未结 2 465
温柔的废话
温柔的废话 2021-01-17 01:32

I am trying to create a simple javascript game with simple physics. I can determine when 2 balls are colliding but I have having problems with handling the collision.

相关标签:
2条回答
  • 2021-01-17 02:06

    Physics for JavaScript Games, Animation, and Simulations with HTML5 Canvas
    is a Book all about modeling Physics simulations in JavaScript.

    Though this book starts off by introducing the reader to some simple concepts in Physics and how it can be modeled in JavaScript, this books will assume you have some basic knowledge in Physics and know how to program in JavaScript.

    0 讨论(0)
  • 2021-01-17 02:12

    In the UK, this would be A-level maths, so not too advanced. I think the phrase you need is "elastic collision". That page has some of the formulae you need.

    0 讨论(0)
提交回复
热议问题