Treasure Chest
1. Exported a treasure chest asset from FAB. Created a rig and "open chest" animation in Maya. Imported it into my project as a skeletal mesh and an animation.
2. Created a montage from the imported animation. Disabled the enable auto blend settings so the animation would stop playing once over.
3. Created an animation blueprint to control the skeletal mesh animation.
4. Created a blueprint for the chest. Added a "G" keyboard input so that when the "G" is pressed the chest animation plays.

6. Create a collision box to act as a trigger box (as learned in class) so that when the player gets close to the chest, the text pops up (the Niagara system activates), and when the player moves away from the chest, the text goes away.
I created a scalar material node in the blueprint and connected it to a new timeline so the material would "blink." The timeline has 3 keyframes where its value goes down, up, then down. I created a Boolean variable to determine whether the outline is active based on the actor's position relative to the trigger box. I connected it to the existing On Component Begin Overlap / On Component End Overlap events. I used the same variable for when the chest is opened ("G" is pressed), but with a "Set Visibility" node to ensure it completely disappears when the chest is opened.
1. I created a new level in our <YourName>_HW2 previous project (//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/)
8. Next, I wanted to fix the "G" input event so that it would only work when the player is inside the trigger box (I created a platform in the scene that is the same size as the trigger box to show when "G" event can occur). Additionally, I modified the text pop-up so that it would only appear when the player is in the trigger box. I used the same method of creating a Boolean variable and getting its set node to determine when and when not to activate the event.
9. Finally, for my dynamic material, I connected it to the press "G" event's animation montage so that after the chest opens, a pearl with an emissive material would gradually start to glow. I used another timeline node with a glow track to animate the emissive.
This is how the final BP_Chest ended up looking:
How it looks in the game scene:
Better Quality Video:
Directory Structure:
1. I created a new level in our <YourName>_HW2 previous project (//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/)
2. Created a new level named HW4Blueprints
(//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/JocelynFayola_HW2/Content/TechArt/Maps/HW4Blueprints.umap)
3. My BP_Chest is in a separate folder under the Content/TechArt folder
(//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/JocelynFayola_HW2/Content/TechArt/MyBlueprint/ChestBP/BP_Chest.uasset)















No comments:
Post a Comment