So i have a tank that consists of a bottom part, a turret and a collisioncomponent(UBoxComponent). Right now the turret and bottom are attached to the collisioncomponent, which is the root component of the pawn.
What i want is:
when the bottom is rotated, the collisioncomponent has to be rotated aswell, but the turret does not.
When the turret is rotated, only the turret has to be rotated.
I can not do that with my structure. Am i doing it wrong? how should i do this?
Maybe there is an option to not rotate a component when the root is rotated? idk
EDIT:
After looking further into this i realize i need to disable a child from inheriting a parent yaw rotation in a way
SOLUTION:
SetAbsolute(), which takes 3 booleans: 1 for location, rotation and scale
SetAbsolute(false, true, false) works for the turret.
I made the turret a separate actor and attached it to the tank mesh. But when i rotate the tank mesh the turret logically also rotates. Is this not what you meant or am i stupid?
So basically the turret has to follow the location but not the rotation.