Issue moving the character along another actor forward vector

Hello everyone,

What I’m trying to do is moving the default third person character along a “beam” or “wood plank”. For that, I’m getting the beam’s forward vector and I want to move using only the W or S input. This is my blueprint right now.

The issue I’m having is that when I try to enter from the opposite side of the beam by pressing W, my character can’t cross because the forward vector of the beam is in the opposite direction. Here’s a video of the issue.

I’m wondering how to fix this or if there is a better way to do this.

Cheers

You must have a trigger that sets the WalkingOnBeam bool to true when the character steps on the beam. Make it two triggers on each end of the plank, and if entered from end, reverse the axis value:

Addition: Okay, two triggers may create another problem, so you can simply calculate if the character is at the start or at the end:

Thanks for your answer! I’m at work right now so I will try it out in a couple of hours and I will let you know.

You can put 2 collision box on both sides of the plank and based on which box was triggered you can use the plank’s forward vector or the opposite one.

I’m not sure if I’ve done it correctly but this way it only cross the beam if I press the S input.