Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想强制 b2Body 的线速度方向在一定范围内。
一种快速的方法是手动设置。像这样:
// pseudo code velocity = body.GetLinearVelocity(); if(velocity > maxVelocity) velocity = maxVelocity; body.SetLinearVelocity(velocity);