Can't rotate component while rotating pawn's root.
I have a pawn, which is a tank. And it has a base, which is the pawn's root component, and the cannon, that is attached to the tank's base.
The Base rotates towards the gamepad's left stick angle, and the cannon rotates towards the gamepad's right stick angle. I can move both elements on their own just fine.
However, while the base is being rotated, the cannon seems to not being able to rotate on it's own. I have both these behaviors trigger from a "Event Tick" node, and through a Sequencer. So base rotation is "then 0", and cannon rotation is "then 1". (base is body, cannon is head) The cannon rotates to the base yaw when there is no input. And it doesn't rotate back when it's not rotating while rotating the base Dx
I have a "Then 2" that handles the forward speed of the tank's base using the vector length of the left stick, and it has no problem triggering simultaneously while the base rotates.
I'm assuming there is something wrong with my arrangement. Maybe my blueprint setup doesn't work how I thought it did, or maybe is something with how pawns work. Frankly I'm stuck and I have no idea why this is happening =(
Ok, the problem was super simple. I was using set rotation on Actor, thinking it would just rotate the base, since it was used as the root in this actor. However, i needed to use the Set Rotation on the Scene Component node on the body component. I did not understood i could do this before.
My problem was in fact cause because i was rotating the whole actor, which interfered with the cannon rotation.
Now it's solved =)
answered Oct 16 '15 at 09:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here