Can someone explain Swing 1/2 and Twist?

Hi,

these constraints make no sens at all, are counter intuitive and never work the way I expect them to

how can I force an object to rotate on one axis only ?

why is it when I try to limit swing 1 & 2 in a particular angle, it does not work at all

why when I use Swing 1 or Twist, it just does exactly the same thing

where are the other constraints ? like hinge ?

thanks

To force object to rotate in one axis only, just leave one axis limited or free, lock the rest.

Let’s say you have a door on a hinge and it should sit at 15 degrees in relation to a wall. To do this, you have to turn constraint itself to face 15 degrees direction.
The other option is to enable drives/motors and set target direction there, but this is a different functionality - motors will actively produce force to keep constrained objects in specific positions.

Twist1, Twist 2 and Swing correspond to Roll, Yaw and Pitch (not specifically in this order). You can see in which axis constrain will work in editor - constraint root will have circles showing the arc of rotation.

Here is PhysX documentation on a subject:
http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Joints.html

6D constrain (joint) can be used to create any other type of constrain.

1 Like

nice, thanks Ill check these up

As of UE4 4.25.3 :

Twist : X axis
Swing1 : Z Axis
Swing2 : Y axis

I believe they should name them x,y and z for easier manipulation.

9 Likes

hello,

This is an old topic but search engines still find it as one of the top links.

Could someone clarify how Roll, Yaw, and Pitch, a ka rotations around X, Z and Y translate to Swing1, Swing2, and Twist in constraints?

I can see two different answers and I find it confusing. I didn’t find any link to documentation. I believe it is somewhere but none of the search engines could find the link.

Thanks

EDIT. My understanding is that Roll and Yaw correspond to Swing1 and Swing2 but Pitch correspond to Twist. I am still not 100% sure if I am correct.