I’m kinda new to this and I wanted to animate the opening/closing of a simple chest with blueprint. I used a tutorial showing how to open/close a door and changed some things, it works, BUT no matter how I set the transform value to rotate the lid, it always rotates in the wrong direction, clipping into the chest instead of opening, as you can see on this quick test :
I’m sure it’s really dumb and easy to correct, but I don’t know how.
Thanks for the help.
Also, is there a way/tutorial about launching custom anims made in Max/Maya ? Maybe I could animate the chest in Max and export in FBX with the mesh itself ?
To play an animation from Max Maya, skin the chest to a skeleton and then export it as fbx. You can create an animation for opening and closing and play either of those in your chest blueprint.
OK I did that, but I don’t know how to use the blueprints. Do I have to use a simple blueprint or an animation blueprint ? And what do I use to trigger the animation ? I watched the tutorial about animating a character but it’s not what I need.
In the content browser, click the “Add New” button that is colored in green and click blueprint class and then actor. Double click it to open it up and click the “Add Component” button that is colored in green in the top left. Select skeletal mesh from the dropdown. In the details panel(usually at the right) look for the mesh section and set your skeletal mesh here.
The functionality and properties for your chest will be placed here, in this blueprint. For a short intro, click the tab labeled “Event Graph”. You’re faced with 3 red boxes. The first one is labeled “Event Begin Play” this will happen after the object is created and ready to go! Click on the arrow and drag out a line, then type ‘set timer’.
For this small sample we will create a simple opening and closing of the chest over a recurring timer. For functionName call it “OpenCloseChest”, set it’s time to 2 and turn on looping. Now you need to create the event that the timer will call after the time runs out. Right click an empty space and create a New Custom Event and label it “OpenCloseChest”
Whatever animation you want to play goes in the slot labeled “NewAnimToPlay”. You can have an advanced chest with many animations(open, close, locked, disappear, spawn, explode, etc) but for this one we will just have 2 animations for opening and closing and you can build off that.
Here is the simple setup for playing open and closed animations:
Drag and drop the blueprint into the game to test the chest animations. You can do this functionality in the Animation Blueprint or in combination with the Animation Blueprint. If the animations are able to play, you can then proceed to unlocking the chest with the player and so forth. There are plenty of examples online as well.