Xodius Studios Blog Post #6 - Widgets and Animation?! - By Justin Palmer

 

 

 

Xodius Studios Blog #6

Widgets and Animation?!

Author:Justin Palmer
Published: 04/07/2023 20:30

The Problem:

     The main problem this week was getting the chest to work correctly.  I knew I wanted the chest to open and then close, and while open have the item inside gradually enlarge from inside.  The animation was quick and easy as the asset came with an animation for opening and closing, and just needed to be timed correctly via the interaction from the player.  The hard part was figuring out how to get a texture to display on the screen and move around! I though of adding an empty actor, but that didn't allow for just an image/texture to be displayed, as it is made for blueprints and static meshes.  Without an image of the item in the chest the player would never know what they received, without doing a full search through the inventory, or a 'boring' popup.  I knew some flair was needed, and I set out to find a way to make it happen.


Problem Solution:

    The solution came to me when I remembered that I used textures on widgets.  I began to create a widget and try to move the texture, but there wasn't function calls for that in blueprints.  Then I was informed of a nice big box in the bottom left, hidden on my second screen by my laptops screen.  WIDGET ANIMATION!

    By adding an animation track you can set the time for the full animation to occur, the position/rotation/scale of items in the widget during the duration.  This was EXACTLY what I needed.  I went to work and had the texture change from a size 32x32 pixel to 7.5x scaled = 240x240 pixel over a half second, just in time for the chest to close.  It looks really good with a transparent background texture and adds the needed flair to make opening a Large Chest exciting!



Video:





Comments

Popular posts from this blog

Xodius Studios Blog #5 Notification Pop Up, Intro-Level Design, Menu Indicator, Pause Menu UI Bug, and Interaction Bug

Importing assets and animations from Unreal 5.0 to Unreal 4.27.2

AI Adventures #14 Polishing the game for demo release - "Forgotten Memories" - By Michael Marquez