Climable Interaction Part 2


Tutorial followed: 

For part 2 of making my climable mechanic in game, I focused on the pawn.

I double clicked on the blueprint for MotionControllerPawn. I created a variable named ClimbingHand. The next part was to change the variable type to BP Motion Controller, and add the object reference. Next to the variable, there is a closed eye icon, which must be clicked to make it editable within the blueprint.

From BP_MotionController I clicked the grab actor tab. I right clicked to add 'Get Owner' and dragged out the return value to 'cast to motioncontroller pawn'. I set the climbinghand as the motion controller pawn target. I added 'self' as well and connected this all. This allows for only one hand at a time to be climbing.

Next, I double clicked 'grabbing' under functions on the left side of the screen. I went into the releaseactor to set isClimbing at the end of the node sequence. I made sure to click the tick so that this is 'true'.

Since this was now modified, I went into the MotionControllerPawn to add a CustomEvent called ClimbingMovement. I could then add climbing movement between Event Tick and Sequence, which was situated next to the Left Hand Teleport Rotation. I dragged the left and right controllers onto the event graph, and clicked get. For both these variables, I also 'got' the isClimbing variable, and further connected them to an 'AND' boolean. I connected AND and ClimbingMovement together through a branch node, and ended with set climbing hand false.

From branch 'True', I ensured that everything would work by using the 'Is Valid' node. I got the 'Climbing Hand' and inserted this to 'Input Object', while also having the target and attached actor connect to another 'Is Valid' node and GetActorLocation. Also coming from Climbing Hand was another target and hand mesh, connected to GetWorldLocation. 

I implemented 'Find Look at Rotation' and a 'Distance (Vector)'. 'Get Forward Vector' and 'Negate Vector' came after this- just beneath I connected this to a 

Leave a comment

Log in with itch.io to leave a comment.