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.
当我使用以下内容时,有时我会在 mmVelik.x 和 mVelik.y 中得到一个负值。谁能解释一下为什么??
b2Vec2 mVelik = ballBody->GetLinearVelocity();
如果该值不能为负,则对象只能向一个方向移动。如果 x 值为正,则速度向右,如果为负,则向左。y 值(向下/向上)也是如此。