What should my pawn componenthierarchy be?
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
SetAbsolute(), which takes 3 booleans: 1 for location, rotation and scale SetAbsolute(false, true, false) works for the turret.
I would suggest different hierarchy:
Root I would suggest different object like default tranform
Than attach tank body to root. And attach collision thing to tank body.
Than attach cannon to root.
This way you can rotate tank body and collision comp without rotating cannon.
Did I understood you correctly?
answered Jul 13 '19 at 06:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here