Here, the ball is rotating forward. The red line is the torque vector, pointing from the ball outwards to the right. In this scenario, shouldn’t the ball be rotating towards the screen instead of away from it?
That -1 is only there because MoveRight has its input scales the wrong way. But that information is irrelevant because reversing both the roll torque AND line trace direction would still imply that it is pointing in the wrong direction.
Also just checked after reading this, MoveForward doesn’t have the -1 multiplication, its incorrect as well.
You are using the ‘Add torque in radians’ node. The unreal documentation says this - ‘Torque to apply. Direction is axis of rotation and magnitude is strength of torque.’
This means that the draw debug line is the axis about which your ball is going to rotate. Not the direction it is going to rotate towards.
Direction is axis of rotation. i.e. imagine the debug line is a pin or axle running right through the ball.
Nowhere in the post have I said the ball should be rotating towards the debug line.
The red line is the torque vector,
pointing from the ball outwards to the
right. In this scenario, shouldn’t the
ball be rotating towards the screen
instead of away from it?
What I am saying is, the ball is rotating in the opposite direction than it should. Have a look at this link, if the torque vector points to the left, then you should be rotating forward. However inside of unreal, if the torque vector points to the left, you rotate backwards.
I beg your pardon. Perhaps this might help…
Your link shows a ‘conventional’ right hand system.
Unreal is not conventional right hand. It is a left hand co-ordinate system. If you draw some debug lines for the world co-ordinate system you can see this clearly. If you build a model in 3Dmax (right hand system) then it will appear in unreal as a mirror image (so you have to set export parameters to overcome this).
Unreal physics is also buggy/inconsistent in this respect. You can even see this in the editor where a +ve rotation about X is clockwise viewed from the origin. A +ve rotation about Y is clockwise viewed from origin. But, a +ve rotation about z is anticlockwise viewed from origin.
This question from Henry Read talks about the inconsistency of the unreal system. (outstanding from 2015)
I, myself am using ‘add torque’ to rotate a complex object about its center of mass and whilst it will complete rotations around Y and Z axes, the rotation about the X axis works halfway and then the Z co-ordinate of the center of mass starts to wander badly.
In short, The handedness of co-ordinate systems and rotation systems are purely conventional and unreal uses its own conventions. Why unreal chose to do it the way they have beats me. It is a bit of a pain really.
Plus there are some gotcha style bugs in their physics I believe but that is really another issue.