3-8 Flying Fish and Reeling it In

To start on some cleanup this week, I wanted to address the fish floating to the bobber. In my research, I found out about the split struct pin option when you right-click on certain options in blueprints. In this case, splitting it was able to split the locations in the level script into the X Y, and Z coordinates. 

 

Initially, I tried plugging in the X and Z values as normally Y is the vertical axis (the axis I do not want to track) but in Unreal, Z is the vertical axis so as shown below, attaching the X and Y stops the fish from tracking vertically. 


The next was a plan to try and get a placeholder catch in, and to do this I wanted to use one of the existing mappings to "pull" the fish in. After looking it up and seeing the project Input settings were the place to start mapping the button, I had to dig through the VR Template to find a button I could use. I initially planned on using one of the triggers, but I remembered that triggers were used to grab objects, So I settled on one of the face buttons for now. Looking in there is where I found the name that I will need to call later. 



The Next step in pulling the fish in is making sure the fish is actually on the line. which by adding a variable on the left, named "Hooked" I can set it to true during the existing collision detection. 




The last step before loading up the game and trying to catch a fish was to actually look for the button press, and the new variable. In my research and something I actually tried to make the fish return, a certain node came up, the Branch node. From my understanding, this functions like an If statement, checking for a condition and then continuing the node flow. Linking one of these up to the "IA_Menu_Toggle_Right" and the "Hooked" variable should allow the nodes after to only happen when both are happening, in this case, it is just going to delete the fish. 


And the result? 





Turns out there's an actual menu that the button opens up, and that input overrides the catching of the fish. 

To fix this, I made a very quick input action and mapping based on the other ones in the template, and mapped it to A on the touch controller:




This however, also did not trigger the catching. After messing with it a bit more, I went to test it and.... my Quest died. Turns out it was on when it wasn't plugged in so I can't test that, but the point of the temporary catch was more to get the logic in place for the option tracking to come in the next two weeks.

Comments

Popular posts from this blog

3-22 A final push