Javascript球碰撞 [英] Javascript ball collision

查看:112
本文介绍了Javascript球碰撞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个具有简单物理原理的简单javascript游戏.我可以确定2个球何时发生碰撞,但是在处理碰撞时遇到问题.

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.

有人知道关于此的任何有用的教程吗?我已经在互联网上搜索了几天,但似乎找不到任何东西.

Does anyone know of any useful tutorials on this? I've been searching the internet for a couple days but can't seem to find anything.

推荐答案

在英国,这将是A级数学,因此不太高级.我认为您需要的短语是"弹性碰撞".该页面包含您需要的一些公式.

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.

这篇关于Javascript球碰撞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆