Turret Isn't Animating Correctly

Hi all,

I’m a bit new to UE4 but have slowly been making progress. I’m trying out new things and currently testing putting a mounted turret on the back of the default basic vehicle in the engine. I created an animation blueprint for it, and in the preview it shows everything working even with the clamps. I have it set up so it should be able to move along with the camera movement, both moving to the pitch and yaw with mouse controls. The blueprint for the turret I then place into the vehicle blueprint. From how I’ve seen these set up, this should be working, but for some reason it isn’t.

Anyone have any advice for how I can fix this? Images in the below links of the setup with the animation blueprint, turret blueprint and into the vehicle blueprint (including camera movement in the vehicle blueprint, in case it’s relevant since it should work the same I believe as the turret’s controlled movement).

https://ibb.co/x8BB0YN
https://ibb.co/zfdr2jB
https://ibb.co/x3NPjW2
https://ibb.co/GpC5KPT
https://ibb.co/TBS0Cfy
https://ibb.co/5kB9kDS

hey there !
in your tower blueprint, you should set this :

315242-inputs.png

That worked, thank you! However, now the camera isn’t rotating anymore. Any idea how to solve that so both rotate?

Actually nevermind, I was able to solve that by placing the controls for the camera within the same blueprint for the turret actor and using a “get player pawn” node.

However, the camera is rotating much faster than the turret, I’d prefer the turret be aligned so it follows the same center of the screen the camera is. Any good ideas for solutions to that? Appreciate the help from you or anyone else as well!

what you can do :
get your camera forward vector, convert it to rotation, and then apply that rotation to your turret.
it should do it.

So I tried this, and another variation, and with both attempts the camera wouldn’t move and follow the rotation of the turret. I have these set up on the vehicle blueprint, since the turret blueprint is an actor and can’t contain the camera. Screenshots of both setups below. Any suggestions for how to fix?

https://ibb.co/0ZjSJFv
https://ibb.co/QcvxW9s