|
I have a box collider and I apply to move it, but instead of going straight, it curves
(comments are locked)
|
|
gregzo's comment is not silly, he's right. The difference between AddForce and AddRelativeForce is that AddRelativeForce applys relative to the object's rotation, while AddForce uses global directions. AddRelativeTorque is causing the object to spin, so the direction AddRelativeForce is applied in constantly changes along with it. If you want to keep pushing it one direction while it spins, you'll want to use AddForce instead. :edit: just realised gregzo and I were both making the assumption you applied this force repeatedly over time, which would result in it following a curving trajectory. It's also possible that it's curving downward because you did not disable gravity for the rigidbody!
(comments are locked)
|

I'm sorry if my comment sounds silly, but isn't AddRelativeTorque meant to do just that? Turn your object according to physics? If you're turning and pushing forward, a curve is what to expect, no?