Verlet积分器+摩擦 [英] Verlet integrator + friction

查看:106
本文介绍了Verlet积分器+摩擦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注"

I have been following "A Verlet based approach for 2D game physics" on Gamedev.net and I have written something similar.

我遇到的问题是盒子在地面上滑动得太多了. 我如何添加一个简单的静止状态东西,使盒子摩擦更大,只滑动一点点?

The problem I am having is that the boxes slide along the ground too much. How can I add a simple rested state thing where the boxes will have more friction and only slide a tiny bit?

推荐答案

只需在指向运动方向相反的运动对象上引入恒定的小加速度即可.并确保它实际上不能反转动作;如果您在积分步骤中检测到这一点,只需将速度设置为零即可.

Just introduce a small, constant acceleration on moving objects that points in the direction opposite to the motion. And make sure it can't actually reverse the motion; if you detect that in an integration step, just set the velocity to zero.

如果要更逼真,则加速度应来自与物体及其在其上滑动的表面之间的法向力成比例的力.

If you want to be more realistic, the acceleration should derive from a force which is proportional to the normal force between the object and the surface it's sliding on.

您可以在任何基础物理学课本中找到它,如动摩擦"或滑动摩擦".

You can find this in any basic physics text, as "kinetic friction" or "sliding friction".

这篇关于Verlet积分器+摩擦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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