week 6
Outline
I looked into changing textures this week. Initially I wanted to make a button on the widget that would allow the player to change the colour of the furniture, but after some thought I began to question whether I would be able to make it to different objects could be selected individually. Given the time frame, I thought it would be best to start with something simpler and work on the project in the future as a personal project. I decided to make it so that the object changed colour once grabbed and the trigger has been clicked.
Progress
After doing some more research I found a method that enabled the textures to be changed at the click of a button. I decided to use this method on the tables so that when the user grabs the table and clicks the right trigger, the colour of the table top will change. This would make the experience more interactive by allowing the user to pick up the tables and relocate them as they wish.
When working on the table interactions, I started my creating a function that would change the colour of the table to a random colour.
To do this, I created an Interact function that created a dynamic material instance for the table top and set random vales for the vector parameters, meaning a random colour would be generated.
The next thing I had to do was code for the action actually happening.
This is where I began to encounter errors. The video I used for guidance used some default variables and components that were no longer available due to the different versions of unreal, so I had to adapt to the changes by changing the methods.
"Get Attach Parent" was the issue as I tried to use it to replace the "Attached Actor" without knowing much about it. This is when I started to think more about another way I could achieve my aim.
Rather than creating all of this code for the task I changed it so that a simple press of the trigger would caude the interact funtion and i did this in the table blueprint.
Useful Links
https://www.youtube.com/watch?v=uvJYKCVnr0M
https://youtu.be/eBGGLCCmzM4?si=5VbgmRZbJcihyfqg
For Next Week
I need to work on the radial menu, creating the widget.
VR dev log 2
Status | In development |
Author | elianao |
Leave a comment
Log in with itch.io to leave a comment.