I have a skeletal mesh of a tank.
The top turret is a bone on the mesh, which I’m trying to rotate to face the player, at a variable rate. This way I can have multiple different tanks which rotate their turrets at different speeds.
I’m doing the rotation within the skeletal mesh animation BP. Currently I’m rotating the turret with this code in the animation event graph:
And I’m using the rotation I set in that code, here in the anim graph:
This code rotates the top turret to always point at the player, and it works great. Problem is I cant control rotation rate. All my attempts to add it have resulted in the turret either spinning wildly in circles or not rotating at all.
If the turret was a static mesh on top of my skeletal mesh, I could just use Rinterp To Constant with a current relative rotation, target relative rotation, interp speed, and world delta seconds, and I’d have my solution. Unfortunately I cant do it this way because having multiple enemy tanks running this code in game is far less framerate efficient than doing it to a skeletal mesh bone in the animation BP.
I’m pretty well stumped at this point and I could really use a hand. Thanks in advance to anyone who can help out!