How do you attach or make reference to a socket in code?

I want to attach my camera to a specific socket in the playermesh so that it can be truefps. In code, in my playerpawn, i have calccamera. There i want the camera location and rotation to be that of the socket?

Hi Eshwar,

You can get the current transform of a socket by using GetSocketTransform() on the skeletal mesh component of your actor.

However, you will probably find that using 1:1 motion from mocapped animation or animation that looks good in 3rd person as the basis for a first person viewpoint will cause some players motion sickness.

Cheers,
Michael Noland

Thx lol. I will look into that. Thats actually true it can cause motion sickness. But that may be a matter of animation. Thanks for the help!

One thing you might try is to add an additional bone to your rig, and animate that independently so it is suggestive of the motion of the character without copying every jolt/shake of the head in the 3rd person animation.

Wait i didnt follow that sorry. So i add an additional bone but where and how do i animate that separately? Could you explain please?