3D UI Adventures Truly Begin

This week was more UI and adjusting to 3D widgets in Unreal Engine 4. I did some research to find out how safe they were to use and although some features don’t work as intended, right now the job gets done. I spent most of my time working on an enemy alert system. There are some flaws but it is set to work properly for the most part. The enemy alert system isn’t very sophisticated, but should get the job done.

Enemy Alert

After setting up the exact position, which took quite a few tries, I got to work on making it work as an alert. The first step for that was binding the colors of the borders used to fill the edge of the player’s view. This became a little difficult when certain things weren’t running properly. After some experimentation where i managed to completely block our view I got something up and running kind of well. The issue became it didn’t fade out of view. The plan for our initial test of this system was a color based appear and fade. This could be the perfect way, or it could be edited later, but the borders on the edge were meant to fade. Instead thanks to some strange 3D widget bug I suppose they shrink out of view.

The system is working, when the color is changed they appear and shrink back out. The shrink is either a little too fast, or just the wrong thing. I spent a few hours debugging, changing when and where the alpha is changed, the rate it changes as well. Nothing seems to fix it yet, but at least it is solid. After some testing in the vive, I realized this doesn’t seem to be as big an issue as it could. For now it is testable, and we can work off of it. If we have to, we have positions and sizes to build cubes into the camera instead of the widget and change those colors to fade out. The error is minimal and can be taken care of later, once we have more elements settled.

Revisiting the Health Bar

I decided to take another look at our terrible health bar. At first, it seemed impossible to fix and I couldn’t find any bug. I hooked up a key press to cause myself damage in order to test it, and saw a proper health bar going from one end to the other. I ran the game on the vive and learned it was still broken, but now we knew it wasn’t because of the widget. I started to look around and our lead had me look at his code for the original one again, and there was the issue. The easiest way to position the health bar was to make it a child of the original in the editor, that was my mistake. Having forgotten to disconnect the scaling done on the original, the health bar was scaling down as damage was taken due to the parent. We disconnected the proper nodes and to no surprise it finally worked properly. This definitely makes it clear we need to double check things that were there previously are gone.

Next Goal

I could spend time trying to fix the enemy alert, but we have a bigger can of worms to open. We have spells and those have to have a proper menu. The current idea is a radial menu. This will definitely be quite the adventure, this menu will have to be changeable most likely during game-play, creating a slight challenge. From this week on that becomes the priority so spells can be given a proper consideration. Right now the plan is the player selects the spell they want ready to cast from the menu, but presses another button to cast it. I hope to complete this quickly in order to get us testing our game as fast as possible and give us the most options when it comes to improving game play.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s