I plan to make a 2.5D sidescroller game where player start at the bottom of a cylinder map and gradurally platform it’s way to the top of cylinder map. How do I make the logic of the player movement. Basically when I want player move right, the player will follow the surface of the cylinder which is a curved surface which is different than when I usually do in normal 2.5D sidescroller or 3d character movement.
It’s like the beginning level of the nier automata, when the player climb a cylinder metal chimney.
I suspect that they rotated the level for that one.
Another way to do it might be to make a proxy actor for the characters that moves along a spline actor based on player and ai move input and passes the x/y back to the pawn which tries to mimic the path.
Thanks. I just took some time and test this method. However, I am probably using a different method due to I couldn’t find a way to mimic the path since character have it’s own movement component.
But I follow this video and it use it’s method. It use spline as a way to find rotation and direction. It’s not a ideal solution due to player x and y are not snap to it. But adding some collision can fix it.
The ideal solution would be player movement + spline snap on x and y axis, just don’t really know how to implement it inside bp.
Didn’t think to screenshot it before reverting my project, but I also fed the new spline vector var into moveinput after branching from the OnSpline bool (which is set on overlap like the linked vid). Might need to tweak the rotate vector depending on which axis is right in your world.
Updating the planer constraint lcoation and rotation to make sure the movement component are follow the spline. That’s a amazing idea, just brilliant. Thank you.
You’re welcome. Not sure how well this would work with AI though, but for player movement it’s probably fine. Might be better if it was handled in c++ with a custom character class. But I’ve seen (and done) worse things in blueprint ticks, so maybe it won’t be a problem.