BSP & ABP Animation for a skeletal Pawn UE4.26

Hello, i tried to animate the “flaps” (Ailerons) of my plane after 3 hours of research and many tries, i did’nt found anything to correctly fit the “BlendSpaceAnimation” with the “AnimationBluePrint”, my goal is : by using or pressing key controller (Thumbstick and keyboard) i would like to animate the flaps during the Roll and the Pitch of my plane, without velocity, at 0 km/h i need to received the input controller to the animation blueprint to animate the flaps and by stopping movements input reset the blendspace to 0, i’m very new to unreal as a programmer and learning a lot, but nothing help me for this issue, the only solution i have found is to use static meshes “flaps” and controlling them into the Pawn blueprint (very not smart to me (it’s a unnecessary calculation). hope i explain well my goal and the issue i reach today !
Thank you folks :slight_smile:

link of the videos :
in fly movement :
BlendSpace :

The calculations happen any way.
a static mesh is actually about a billion times cheaper than a skeletal one with animations.
Keep at it and in about a year you’ll “just know” why from having crashed into it.

Now as far as the BP and animation.

Rule #1
the animation blueprint shouldn’t include any code at all.

Rule #2
The pawn / actor that defines the animation should Cast once during construction and save the ABP variable to re-use elsewhere.

The ABP state machine is fine.
Make sure you have it hooked correctly to the output.

To change the value and animate, you use the value of the ABP you dragged off, and you Set the float value you defined inside the ABP from the character/pawn.
Probaboy either at the same time as you provide input or OnTick if thays how you are moving about.

bonus note.
Variables already have a default value. There’s no need to set them to 0 on load if you have the default value set to 0.

Okay, but without a delta time or a tick i’m not sure to understand from where the ABP will received the info of the actual Roll // Pitch vector to put ON the BlendSPace.
To match the value desired -100 to 100 as exemple for the flaps. i know how to do that for a character by received his speed and his position, but with a static plane without movement, i’m struggle with where the informations came from to said to the StateMachine “activate Roll or Pitch” by value (Gamepad or keyboard) i’m novice with codes and visual script.

And i use a skeleton to share the same futures animations with multi planes (Large gliders, Rc planes…) but i understand the cost of each now thank you, will review the target and the numbers of planes.
thank you by advance.

Well, the actual roll is directly linked to what button you press.
it’s actually the value of the axis. X and Y that is also used for movement.
change the blendspace to a -1 to 1 range and just use the axis value :wink:

i’ve tried this morning, by couple of time, i actually change a lot of things into the concept, many hours later i’ve found alternative solution for moving the flaps by calling a function named SetRelativeRotation the target is the flaps themselves and with sockets i snap the flaps to the body of my plane, the origin point is a the same place now i’ll brainstorming tomorow, and i’ll tried to controlle with map range clamped the rotation with the desired value from the “currentRoll” not really difficult and some tutorial on it, but thank for your help.