Download

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

I have find something …it worked but I dont know if it will be easy to explain…The problem was that it was messing the orientation and the cameras after had a colision so I had to adjust that as well …the blueprint is little complicate but has a lot of notices…any thought how I can send that?..screenshoot it will not be good res exept you know a way to have a good one. Generaly the idea is a single line trace colide with a blocking volume takes the curent position on spline and sending all the time the player to that position

Has anyone been able to get this to work with any recent versions of UE4? It appears that _C has been removed from the latest builds. I tried selecting Spline instead of Spline_C as a test. When I then try to select “Spline_Blueprint” in the character BP dropdown…it says “editing this value in a class default object is not allowed”. Any help would be very much appreciated as there are no longer any working tutorials around that show how to move an object on a spline path.

Pretty useful thread and awesome tutorial, the problem i found with this system is that the movement is CPU dependent, anyone has any advice on it?

anyone got any solution for solve this problem: moving your character along spline and encounter a stair mesh that you want to climb on the stair side and block if you are on the “wall side”. I make a draw to explain the problem better:

db310ef7809da136cb8d6b0e6586997f923b3153.png

Any update on this?
Really need this on newer builds.

I used this guide when I was game jamming a VR sidescrolling platformer. You can see the final product here:
https://dl.dropboxusercontent.com/u/3227010/GameJamGames/Fjord%20Vaulter%20v1.0.0.zip

If anyone is interested, I can post the project files or screenshots of blueprints, just PM me.

Thank you for putting it together!

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?

Update: I fixed it by unticking the SetActorLocation built-in sweep, and performing my own by doing a Capsule Trace forward, then checking whether it’s higher than the step up height, and if it is, then stop the player movement And don’t let the AmountToMove increase. If NOT higher than the bottom of the capsule plus step up height, then let it go through. Built in sweep checkbox stops player movement without the option for additional logic. This made it so my character couldn’t walk up stairs or ramps. But now he can.

Now all that remains is to stop it from jittering when he tries to push against wall. I think this is caused because I calculate AmountToMove (which is what adds to the DistanceAlongSpline every tick) based on character movement input velocity rather than the actor’s ACTUAL velocity. I’ll have to run some experiments and see. But for all purposes, I have solved the collision problem.

Make sure you debug display your capsule trace (it’s one of the capsule trace options in its node) so you can confirm it’s tracing the correct distance and direction from the player character)

Hi guys, this thread has been awesome, thanks to everyone for saving me watching super long videos of rambling guys.

I’ve got it all working fine, but, of course there is a but.

In the example video Monophobe posted (#2) I can see the camera adjusts to the curve of the spline, but my camera just stays on the same side of my character.

Can anyone help me with this, ideally want a result like Pandemonium and if I was to be running up a mountain in a spiral type fashion, I’d like the camera to pan around the mountain as the character does.

Does this make sense?

Any help appreciated!

Thanks

I’ve gotten the camera following to work with a spiral staircase. I just put the camera track further out in a wider spiral so it’s always looking in at the character from outside the staircase, toward the center of the staircase. I also have to raise the camera spline points off the ground to match the character path spline points’ heights at the right places, but it’s pretty simple.

I know its quite old thread, however, Not sure how to apply to many objects , since I’m trying to avoid moving at tick, but instead “Move Componenet to” and it doesnt seems it working with Forloop as well.

Any idea how that could be possible?

I dont follow. What are you trying to accomplish, and why do you need to avoid tick or use move component to?