Set Constraint Reference Orientation node tweak

I think it would be better to change the properties of the Set Constraint Reference Orientation node so they make more sense.
(Set Constraint Reference Orientation | Unreal Engine Documentation)

The node should take a rotator instead of two vectors and feed the rotator’s forward and right axes to the constraint under the hood. (Or whatever pri and sec axes supposed to be.)

Yea well, what the ■■■■ are Pri Axis and Sec Axis anyway? Any Documentation here besides “Pri Axis Vector (by ref)” and “Sec Axis Vector (by ref)”?!

Sucks when the documentation literally says nothing at all and we have to figure it out ourself.
Also “Pass in reference orientation in (maintains reference position). If the constraint is currently active, this will set its active local pose. Otherwise the change will take affect in InitConstraint.” doesn’t help in this case.

Guessing, that those vectors are the forward vectors of the two constraints, but I am not entirely sure…

2 Likes

Pri Axis and Sec Axis stand for Primary and Secondary axis, and are the Forward and Right vectors respectively as speculated. I suppose a rotator would be better in this instance to make it clearer for users and I’ll look into making the necessary changes. Cheers,

I was also looking for this, because it’s quite ellusive.

I found this in the source code in ConstraintInstance.cpp:


void FConstraintInstance::SetRefFrame(EConstraintFrame::Type Frame, const FTransform& RefFrame)
{
if(Frame == EConstraintFrame::Frame1)
{
Pos1 = RefFrame.GetTranslation();
PriAxis1 = RefFrame.GetUnitAxis( EAxis::X );
SecAxis1 = RefFrame.GetUnitAxis( EAxis::Y );
} 
.......

So they are the X and Y axis of the transform.
So, instead of bothering with the SetConstraintReferenceOrientation, it’s just simpler to use SetConstraintReferenceFrame by inputting a transform and just copy the position data from the current one.