I’m trying to get the up vector from a socket. So far I can get the rotation and the location of the socket, but getting the forward and up vectors I can’t seem to do, at least with the functions I know of. In Blueprints one just needs to use the Get Forward Vector that takes a rotation and use the Get Socket Rotation function. Is there such a function in C++ or do I have to do some fancy maths?
You can right-click blueprint nodes and choose “Goto Code Definition” and it will lead you to the code definition for the blueprint node. To get the up vector, all you need to do is FRotationMatrix(in_Rotator).GetScaledAxis(EAxis::Z) with in_Rotator being an FRotator that is the socket’s rotation.