如何将池碰撞响应应用于矩形对象? [英] How can I apply pool collision response to rectangle objects?

查看:107
本文介绍了如何将池碰撞响应应用于矩形对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施一个游戏,其中的对象是矩形有界。但是一旦发生碰撞,他们就需要像撞球碰撞时一样移动。我看到了一些游泳池碰撞响应,但它们都是圆形有界物体。请建议如何对我的矩形有界对象进行相同的池碰撞响应。动态对象与静态对象发生碰撞,之后两个对象都需要像池球一样运行。请帮忙。

I am implementing a game where the objects are rectangle bounded. But once a collision has taken place, they need to move like how pool balls would move when they have collided. I saw some pool game collision responses but they are all for circle bounded objects. Please advice how to do the same pool collision response to my rectangle bounded objects. A dynamic object collides with a static object after which both the objects need to behave like pool balls. Please help.

推荐答案

即使您将自己局限于矩形的碰撞,实际的物理也不简单,例如,请参阅此页: MyPhysicsLab - 刚体冲突 [ ^ ]。对于更复杂的形状,事情开始变得有趣...... [ ^ ]。
Even if you limit yourself to the collision of rectangles, the actual physics is not simple, see, for instance this page: MyPhysicsLab – Rigid Body Collisions[^]. For more complex shapes things start becoming interesting...[^].


这篇关于如何将池碰撞响应应用于矩形对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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