week 8


Outline

This week I have been focusing on the actual coding for the widget. I started by creating a new function that checks if the hand is orientated in the same direction as the camera while the player is looking at it. From there I called the function in the event graph and set the widget to show.  After this I had a little difficulty to do with action mapping. I couldn't find the input action for the right trigger as the new version of Unreal uses enhanced input. Therefore I had to look into it and read the documentation. 

Progress

I found what I was looking for in the VRPawn blueprint as everything that had previously had its own blueprint had been combined into one.  I added the widget I had made previously to the viewport and placed it so that the player would see the menu in the wrist area. 


Once I had done this I went back to the Hand UI widget in order to make the buttons do an action. The simple code I used is shown below. 


Next up was coding the widget interaction. I already had the placement of the widget but only wanted it to appear once the player was looking in its direction. To do this I created a new function for detecting the location of both the players head and the hand. If the player was looking at the direction the hand was facing, the widget would appear. 

I also had to allow there to be interaction between the players hand and the widget itself so that the buttons could be pressed.

Useful Links

https://youtu.be/lgsR1g-5HKE?si=k-sx-G8Hd6DjwVt5

https://youtu.be/eBGGLCCmzM4?si=5VbgmRZbJcihyfqg

For Next Week

  • Adding to the aesthetics
  • Potential lights 

Leave a comment

Log in with itch.io to leave a comment.