Socket transforms


I’m trying to update sockets rotation through Blueprint but I cannot find a node to do so.

I have a Turet that is aiming a target, the turret is composed by a “Body” wich is used to “aim” at a target (yaw, pitch) and a machine gun (4 cyliinders) wich is rotating also (roll). The machine gun is made with one bone, so I can manipluate it as I only need to roll it, resulting in rolling the 4 cylinders. When importing the mesh in UE4, I’ve created 4 sockets, one per cylinder, at each cylinder start location and following forward vector, so I can use them to line trace the future bullets paths for each of them. My turret is already aiming the target (the body is looking at target) and the guns are already rolling as well…but the the sockets forwards vectors (as rendered with Line Trace) are not rolling. Is there a way to control the transform of sockets via Blueprints at runtime?

Sockets follow the rotation and location of the bone or static mesh they are created on automatically so i dont know what kind of problem you are having. Can you post some screenshots please?.

The problem is that the sockets are not aligned with the cylinders.

As you can see, the red lines (line traces) are not aligned with the rolling cylinders.

Here above you can see the 4 sockets (red) attached to the body bone (yellow).

I’ve choosed that bone because I want the sockets to follow automatically the turret when it aims at a target (yaw and pitch from body).

But,…I want also the sockets to roll with the guns…
Here is the Turret_guns bone:


So, to roll the guns, only one bone is needed and that bone is linked to the 4 cylinders vertex group.

Now, the only thing remaining is to manually rotate the sockets to match the rotation of Turret_Guns bone.

That said, the bone is only rolling so I cannot only roll the sockets but provide the right rotation in order to follow each cylinder.

Another way to solve this quickly is to create one bone per cylinder but I would like to use the sockets. More over, I plan to attach bullets to those sockets…

Then the problem lies within your blueprint setup i think. You need to get the location of the sockets from the mesh of your turret BP and then use each socket’s location as each trace’s start location.

That’s already what I’m doing: I take the sockets location and trace a simple line. I think that the sockets are following the bone in wich they are attached, thus the Body bone, but doesn’t reflect the rotation of Guns bone. That’s why I want to know if there is a way to rotate sockets manually in Blueprint.

It doesnt look like just a rotation issue though. The traces look like they are starting from the root bone. Can you post a screenshot of your BP as well please? And it would be even better if you are able to share the asset for us to take a look.


Even if I still don’t know how to manipulate sockets manually through blueprints, I’ve found a simple solution: change the parent bone of my sockets!
Indeed, As my Turret_Guns bone is himself a child of Turret_Body and seen that only the Turret_Guns rotation was missing from the sockets then I’ve just parented the sockets from Turret_Body to Turret_Guns bone.
As a result the sockets inherits from both Body and Guns transforms, thus the sockets rotations are now matching completley!

Result (while guns are rolling)

Thanks for support!