I have a drone, and it has 3 animations I want to use for the animation blueprint, idle, turn left, and turn right. How do I set it up so that when I press A key, it will play the turn left animation, when I press D, it will play turn right, and will play idle for everything else? Like I have an ascend/descent input that works, and want it to play idle for that, and when I press W/S for forward/back it should play idle also. All the tutorials I’ve watched for animBPs use speed, not if a certain key is pressed, to determine when to play animations. Thanks for any help.
do you want to turn the drone left and right (rotate) when you control it?
if your animation blueprint goal is just rotate the actor and not actual animations (like hover or things like that) I think using animation blueprints is overcomplicate things
You can just lean the drone by storing neutral, right and left orientations and then you have the current orientation and use Rinterp to to interpolate the orientation according the situation (Rinterp interpolates a rotator).
No, I want exactly what I said. It strafes left/right when using A/D now, I just need it to play the animations when using A/D also.
use this:
you can put animations in a line (from -1 to +1) and blend the animations based on a value in the line
But how do i set the value that determines which animation is used in the blendspace for the key presses? That’s what I’m confused about.
Compare user input vector with drone rotation to figure out if user is pressing left or right, and set a variable for animation like @eldany.uy showed.
Here is an example how you can calculate it :
Thanks Chatouille & eldany.uy, appreciate the help and fast replies, that should fix my problem.
EDIT: OK, I tried it, and it works, but I didn’t call the tilt value properly, I wasn’t sure how to do that. This what I called in my drone animBP after making a float called Tilt in my drone blueprint. I used try get pawn owner b/c I was just guessing how to call that variable, and it was clearly the wrong way, so one last piece of help is needed to call that properly, thanks.
EDIT 2: This post helped me out, works perfectly now. [Noob Question] Character BP Float Variable to Animation Blueprint. - #4 by EvilReFlex