Is it possible to get the relative fvector from sockets?

I have been trying to get relative fvector from the sockets, but all i can seem to get is a world fvector, Does anyone know if it is possible to get relative fvector from sockets. i see when i add the sockets that they are in relative.

Looking at the API documentation, I’d try GetSocketTransform. The signature is this:

virtual FTransform GetSocketTransform(FName InSocketName, ERelativeTransformSpace TransformSpace) const

with ERelativeTransformSpace defined as

enum ERelativeTransformSpace

So my guess is this should give you what you want:

Comp->GetSocketTransform(SocketName, ERelativeTransformSpace::RTS_ParentBoneSpace)
1 Like

thanks a bunch will try that now. Does that reset the transforms, like scale?. I tried some transform function, but it reset my scale to 1.0 which increased the size of my component.

No, that shouldn’t happen. Getters don’t typically change the data they’re operating on.

Compiling now, hope this works.

It works, but my other code i had in does exactly the same as the transform code. This is frustrating. I guess i can show 2 pics of what is going on.
This is the starting position of the dice. See the closeness of the dice together right next to each other

Get the sockets start point for the player. See the gaps between the dice, they should be close together like the 1st picture. As they are same coordinates for spacing in both, but do not show that.

It seems that constructor start. To moving during play it completely different. When it comes to positions and rotations.

Fixed the problem, found the fvector was getting double called.