Tank gun stabilization
while creating a tank I`ve stucked on one issue - how to do gun stabilization effect similar to Battlefield or Call of Duty (barrel aims at one point in space, so its pitch varies depending on ground) in blueprints?
The best result was when I modified script from this tutorial, but it wasn`t perfect - the barrel constantly aimed at the center of screen. I`ve been trying with Line Trace Component, but without effect. I also experimented with Rinterp, but effects were similar to above (barrel aims right at my face :)
Thanks for any help, suggestions etc.
asked Jan 04 '16 at 09:46 PM in Blueprint Scripting
I recently calculated hip tilt angle for standing on uneven terrain as part of my IK setup, I believe its a bit similar, so I will try to explain the simple trigonometry which I used, it works perfectly, but maybe there is a simpler way which I don't know of. Here it is in BP, (also sync required variable between character BP and animation BP if not doing trace in animation BP.)
EDIT: You don't need to convert anything into vector for anim graph as in screenshot, only to rotator.
Follow this question
Once you sign in you will be able to subscribe for any updates here