3-16 Speed Measuring
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 looks to see if the velocities are over that threshold, and outputs either true or false from that, plugging that into where the controller input would have been.
there were a couple of errors when trying to compile due to the casting to the VR pawn, but now the blueprint compiles like this:
It now checks every tick on the VR pawn and the velocity of the controller and will look for that as the way to delete the fish. The only thing left is to see if it works.
Comments
Post a Comment