Hi, I just started learning UE5 and getting stuck at many places. I have a little experience in Unity and much more in Godot.
I am trying to rotate the rotors of a drone, which has a skeleton system (thanks to the creator who posted it to Sketchfab).
After hours, I finally managed to create an Animation Blueprint and attached a “Rotor Speed” variable to one of the bones. Even though I can see the animation in the little window on the left side, it doesn’t work in the game.
As a new member, I can only put one image in this post, so I’ve created this image
[TOP LEFT] My animation event graph. I have set the rotor speed to 500. Later, I will change it from the actor’s blueprint.
[TOP RIGHT] My AnimGraph
[BOTTOM LEFT] I’ve set the animation to my animation blueprint
[BOTTOM RIGHT] I’ve even printed the rotor angle to the screen and it looks like it is increasing. But it is not rotating.
Can anyone help me?
Your top right image shows there is something missing on the left side of the node. Try to add a node “input pose” or a basic idle animation sequence (can also be a static pose animation sequence with only a few frames).
I also recommend you take a look at this free asset that comes with Animation Blueprint and similar controls, but yet not playable.
AH-64D Apache Longbow (West) in Props - UE Marketplace (unrealengine.com)
Which can be something to consider, if your drone is not set to be playable with proper movement controls, may not work.
To create a controllable drone, this tutorial might help you.
Fully Controllable Kinematic Helicopter from Scratch - Unreal Engine 5 Blueprints Tutorial - YouTube
Hi, just some quick idea:
are you sure, that Mode is not set to Ignore? This is in the Details section for the “Transform Modify Bone” node…
Thanks for the answer. I’ve added an animation and recompiled the animgraph.
It still plays correctly on the left window but not in the game.
It is like I am somehow not starting the animation.
Thanks for the answer. I tried both with Replace Existing and Add to Existing.
By the way, it is also not playing in the editor (except the animation blueprint). Should I be able to see the animation while I am editing the level?
So, if the animation is playing correctly in the preview window, that means you´ve setup the node Transform Modify Bone correctly as remained by herb64. Have you had a change to examine the links I´ve sent you yet?
Are you updating the value of rotation angle correctly as non-zero value?
Ah forgot to mention sorry.
I will definitely check the video.
As you can see in the bottom right image in my original post, I am printing the value directly from the animation instance and it is increasing
(the green text)
It seems to be very big values. Try to use a clamp float node to limit between 0-360 degrees. The Helicopter asset has a similar example for rotor movement.
I watched the video and it looks like I’ve done everything it says. But,
When I deleted this Physics Asset from my skeletal mesh, the animation started playing.
Of course, now I don’t have collision and physics on my drone.
I guess I misconfigured something. What should I do to have both physics and animation?
You can edit your physics asset and create one sphere body that encompasses the whole skeleton and one for each individual rotor.
You may not need a physics asset, unless you want to simulate a “ragdoll” effect. You can remove it and add a sphere collision in your drone BP and assign collision settings profile type “Vehicle”. That should work.
At this point, I think I want something impossible.
The thing is, I am moving this drone around with forces. I’ve built a PID controller in its blueprint and when I give height or orientation requests, it calculates necessary forces in every tick and flies.
And I also want to animate the rotors.
When I remove the physics asset, the animation works but (I guess) since it doesn’t have a physics component, I can’t apply forces to it.
But if I want to apply force, it should be a ragdoll and shouldn’t animate.
Did I get this right?
Maybe, working with physics can be tricky and requires proper setup in a proper order. Have you tried to play test that way? Try to observe its behavior and debug with print strings.
Thanks for the help. I’ll try.