How to animate a static mesh?

Hi everyone,

I’m fairly new to Unreal and I wanted to know how can I animate a static mesh.

Here is my problem : I have a chopper with 2 seperate static meshes, the body and the main rotor. I just need to rotate the main rotor and animate the height of the whole actor.

As a former Unity user. I used the animator (Animation window) to just “record” the rotation and the height and I saved that in for example “Start.anim” and doing it again and saved it as “Idle.anim” set one or another as a looping animation and… done, just need to tell Unity “Play that animation”

Is there a way of doing that ?

Thanks everyone,

Alex

2 Likes

Have so many ways to get what you looking for. In my opinion, this is the most easier way to do that.

In this example i use an accoustic guitar. Create a blueprint for your root component (The body in your case), add a component that will be rotated around the parent (your rotor), atatch to the right position and proceed to the next step.

In this example i use the Z vector to rotate the object around this orientation, but you can rotate in any axis as you want. You simply can get the time in seconds, multiply by velocity that you want, make a rotator from you rotor and add the time value in desired rotation axis. You’re not really need to use seconds as a parameter, you can use minutes, milliseconds etc. You can make this triggerable by a key, or something else.

Here is the result:

264020-result1.gif

But to move an oobject, you will need to set it to moveable, you can rotate static meshes, but not move them.

Here is a basic setup for this:

I’m using in delta time exe to trigger all of this, but you can trigger this by other methods, trigger by overlap collision box, or on hit key by player.

Hope this helps. Let me know if this works for you. Good luck

2 Likes

So everything needs to be made in code ? I mean my chopper is a state machine with 4 states : Off, TakeOff, On and Landing. Does it remember you a tool or something else to acheive that ? Of course I can make a UENUM and set it’s state with a Timeline but I don’t know I thought there was something like the Animator in Unreal. It has to posess a tool it’s just hidden by the huge amount of features the animation module provides :stuck_out_tongue:

Thanks a lot :slight_smile:

Alex

Here. First of all, you will need to place a desired static mesh that you want to animate in scene, after that you will create a Level Sequence class, on animation section in menu.

after that, rename and open the new level sequence that you have created, just drag and drop the object that you want to animate from your scene outliner to your level sequence, now you can move rotate and scale the actor around the level and press ‘S’ in time sequence to insert a key to record the current (location. rotation and scale) time of animation, unreal will automaticaly smooth animation for you, so don’t worry about that.

You can put the level sequence that holds your animation time line on scene, and under details panel of your level sequence you will find the settings to setup it as you want. You can trigger it by BP, start when game begins, set it in loop, etc.
This is the result:

264137-3.gif

Hope this is what you looking for.

3 Likes

That’s exactly what I’m looking for ! :smiley: Thanks !