My question is rather a theoretical one, I don’t have any specific issue in my code or something, I am just trying to understand how the engine works to be able to use it more effectively…
So I am in need of applying torque on my physics actors. Naturaly, I came accross the AddTorqueInDegrees/AddTorqueInRadians methods. And I don’t get it.
I have very basic (like highschool level) knowledge of physics and am mediocre at best in mathematics, so that might be the problem. But anyway, the question: where/when do the angular units come in action here? The input here is a vector, so I would expect (after some heavy simplification in my mind) I basicaly input three “magnitudes” of force (would expect newton(centi)meters here by default) giving the resulting vector it’s direction this way. The documentation aggrees with me, as I understand it. It’s very brief though, and more importantly exactly the same for both methods, except the name.
So is there somebody, who could tell me where am I wrong, what am I missing, where do the degrees/radians come in the equation and how does the behavior of those two methods differ?
You probably imagine that in this function you apply torque around the body’s local axes - X, Y, Z. But this isn’t true.
The vector you are passing to AddTorque is the axis of rotation around which you apply torque. And the length of that vector is the amount of torque. In other words, you are applying a force that will rotate the body around the given axis in the clockwise direction.
Usually, torque is measured in Nm (Newton-meters) in the real world. However, Unreal uses cm as a unit of length and kg as a unit of mass, which means that torque is measured in cNcm (centiNewton-centimeters). 1 Nm = 100x100 cNcm = 10000 cNcm.
The only reason I see for mixing degrees/radians here is that these functions can also work by applying angular acceleration (bAccelChange param). And in terms of acceleration, angles/s^2 make sense. However, when applying torque in cNcm, the naming doesn’t make sense. In such case, you need to use AddTorqueInRadians and pass the torque in cNcm.
Thank you, this very much aligns what the research I kept on with after posting the question (which I totaly forgot about ). Marking as solution for future generations