I’ve been trying to set up this blueprint for a while now, to no avail.
I want to have a character shimmy across a wall when they’re hanging, and want them to move 10 units to the left/right when the animation is playing. I’m doing this by moving the capsule component.
However, I can only seem to get it to work in one direction, for example the Y-axis, which works great when the character is facing one way, but when they’re facing the other way, they start floating away from the wall.
I know that this is because of the use of a single axis, but I can’t figure out a way to get it to work based on the character’s current rotation and a single value. Any help would be much appreciated. I’m adding a screenshot of my blueprint script so you can see where I’m coming from.
Have you tried using GetRightVector? With that vector you should be able move your character sideways(like strafing). Scale the returned right vector accordingly too.
This doesn’t seem to work and only pushes the character into the floor and further away from the object. Is there something I should be attaching to the Get Right Vector?
Is there a reason you’re applying your movement directly to the capsule component? Typically movement is performed through the actor so that the attached movement component can handle the actually change in location.
This is an excerpt from the first person tutorial from UE 4.15.
Here they are adding support for a VR headset and using a switch to determine if they want to use the camera right vector or the actor right vector and then apply the movement through the AddMovement blueprint node.