Tutorial: Blueprint Spline locked sidescroller (e.g. Klonoa / Pandemonium style game)

I conquered the going through walls problem by doing the following:

  1. From Event Hit, test whether hit location is higher than step up height (i chose waist high so that might be different but it’s the Z center of the capsule)
  2. if is higher, then set Distance Along Spline to itself minus Amount To Move,
  3. Then set Amount to move to zero.
  4. Then kill X and Y velocity of the capsule or the Actor. but preserve Z velocity.
  5. Also kill the Character Movement velocity values in X and Y. This appears to be a separate value from the actor velocity.
  6. When setting Actor Location, I turn on the Sweep option.

After adding this to my blueprint, My character stops dead horizontally if he touches a wall, but doesnt get stuck on the wall, and can still walk up stairs.

EDIT: Okay so I guess this doesn’t fix it properly – I found out that this strangely kills the character’s ability to walk up stairs when traveling in the negative X direction (why so specific, I don’t know).
I turned OFF the Sweep option in Set Actor Location, but then the character can go through walls again!
Next time I work on it, I will try using a Break out of the Sweep Hit Result and hopefully I can use that very large set of outputs to come up with a better solution.

I think the key will be using Sweep Hit Result INSTEAD of Event Hit, and find out if there’s a way to conditionally sweep. If not, I’ll have to turn of Sweep and create my own version of Sweep that probes ahead and stops the player conditionally. I will need to find out how Sweep works, and maybe use a different function than Set Actor Location?