I want to disable the socket rotation. I only need the socket position. The socket rotation should be the same as the RootComponent rotation.
I thought i can set the socket rotation every tick (better way?), but i can only get the RelativeRotation of the socket and not the world rotation. I need to set socket worldrotation = rootcomponent worldrotation.
btw, how can i set a socket location/rotation in c++? because Socket->RelativeLocation is a const FVector, so i cant use this property, and i cant find setter functions
Background for my question:
I want to attach my CameraBoom to a socket thats attached to my character head. And my character rotates with the camera (bUseControllerRotationYaw = true).
If i dont disable the socket rotation, the socket will rotate my camera (when an animation is played), and the camera will rotate my character and because the character is rotating, the socket will rotates relative to it, so the socket has a new rotation, this will cause the camera to rotate, … and again from the beginning. It will cause my character jerking around the z-rotation axis.
I can solve this problem, if i can disable the socket rotation. (while the character plays animations)
An idea for a workaround:
I create a second socket and attach it to the root. Then i get the location from head-socket, and set it to this socket. This will give me a socket that’s attached to the root with the location from the head socket. (but for this i need to set the location and i dont know how)
Wow thats great, its soo simple it didnt come to my mind Thanks!
But for other situations: There is realy no way to set a socket rotation/location via c++, only with the editor? It seems strange that this isnt possible.
I found the cause of the problem. Its somewhere else. It has something to do with the network replication.
I think the server wants to adjust the character rotation and that causes the character jerking. (not the camera is jerking, its the character)