Posts

3-22 A final push

Image
 So, did those changes from the last post work? No, but hopefully we can get that to change. For starters, I need to find out what the speed is reading.  This print string node I found will show it on the screen, and it's showing as (0,0,0), which tells me the blueprint is not looking at the right thing. Or, maybe it is? I'm not sure exactly, and after testing some of the other nodes and doing a little research, I landed on this thread from the unreal forums: https://forums.unrealengine.com/t/how-to-i-get-motion-controllers-velocity/97140 and I decided to test the world position of the controllers, which did show up and update so, trying that looks like this: and surprisingly, it works sort of. It outputs around 2 in the Z when I do the reeling motion, so that should be what I need to use when looking for that. The next step was to hook that up to the temporary delete which looks like this:  With the AND node looking at the collision. Now it is time to test this, and... Instant

3-16 Speed Measuring

Image
 So, reeling the fish in. Lots of good feedback here last class and I'm going to go over how I think this would best be achieved based on what I heard. The plan is to look at the speed of the player's hand to determine if they are "reeling" in the fish, and that same measurement could be taken from the rod to see if the rod was yanked back. Basically measuring the speed of the objects in some capacity is how this fish is going to get pulled in. Pretty conveniently, there is a velocity module in UE5: https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Utilities/Transformation/GetVelocity/ Getting into the blueprints now, this is what I decided to try first  On paper, Looking at the right controller in the VR pawn, it should shoot out how fast the right controller is moving. After adding ab it of logic in there, the blueprint now looks like this: I made a new float there as the threshold and measured the Y and Z velocity based on how the player loads into the game. It

3-9 Recap and Timeline

 With two weeks left, I felt it would be a good time to explore what I plan on doing for the rest of this project, in addition to what I was able to get done during this presentation cycle.  Most Recent Video:                                        The Next Two Weeks:  Week 1: Getting Reel In Logic working and doing little visual things while researching motion controls Week 2: Implement motion controls

3-8 Flying Fish and Reeling it In

Image
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 settl

3-6 Fish on the Line

Image
  Based on the plan, it was time to start getting this last mechanic into the game, starting with getting the fish to move in the other direction. The first thing I did was get back to looking things up and got some help from the Unity forums.  https://forums.unrealengine.com/t/how-do-i-make-a-blueprint-object-move-away-from-another-object/448076/4 Using this as a jumping-off point, the first test I went through was this:               Turns out, a quick connection in the level script was all I really needed to get it to move back: The next thing is to bring the bobber back with the fish.  As it turns out, there is an "Attach Actor to Component" which lets you pick the parent and child, so using the same collision that I set up to delete the fish earlier, I was able to put this together: It wasn't quite working right but changing the location and rotation rule to "Snap to Target" got the bobber moving with the fish. Here's a look at what that looks like: Tes

3-2 Plan of Action

I have been looking around for a jumping-off point to get the fishing line going, and I have not had much success. However, I dug and dug and finally found my plan. So this plan of action came from this link right here:  https://medium.com/swlh/how-to-implement-a-pulling-chain-in-vr-in-ue4-4abdca5ed817 This is a pulley system which is not quite a fishing rod, but it's not quite so far off of not only what I have, but where I want to go with the project. This project has the length of the cable component being set and measured, which activates certain things in the scene. Theoretically, this means two things: 1. Cables and their lengths can be accessed and controlled with scripts 2. That length would be able to looked at and measured, and the delta of the length could also potentially be able to trigger things with scripts.  The implementation for how I see this would be as follows: -Getting the initial cable length -Changing the fish to not just disappear but to grab the bobber and

2-28 Fishing Line and Crashing Research

 So, with the very rudimentary fishing system in place, it was time to start moving forward with getting the next mechanic in place.  First, I started with a look at why my UE5 keeps crashing.  This resource from Epic themselves has a few possible solutions to the error that comes up: https://docs.unrealengine.com/5.0/en-US/how-to-fix-a-gpu-driver-crash-when-using-unreal-engine/ In addition, here's a video I found that does look that those solutions in action: https://youtu.be/Vejhv9QmNGM After spending time getting those things in order it was time to look into the fishing line itself, starting with looking at how other people have done something similar.  The closest example I could find was this Reddit thread: https://www.reddit.com/r/unrealengine/comments/s0aw03/i_made_a_toy_fishing_rod_using_cable_components/ He achieves the look of the rod with 3 cable components, and it's only really the one on the end that changes length. This might be the easier of the two to attempt t