Torque rotates the actor the wrong way?

In the rolling ball content pack, aren’t the torque vectors effecting the ball rotation in the opposite way?

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?

And here, the ball is rotating to the left, yet the torque vector points away from the camera.

And this is the code I used to draw these lines, same code for MoveForward.
Am I missing something here?

Bump bump.

Your reversing the roll torque and line trace direction with that multiple by -1.

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.

See what I mean?

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.

Now I see it. Thank you for making this clear. I forgot all about the coordinate system ue4 uses.

hi :slight_smile: just to ask if this wandering that @Podgyhodgy describes would cause the following… Add Torque in Pitch & Yaw, is causing Roll too... World/Local Space - Programming & Scripting - Unreal Engine Forums