I’m trying to implement a mechanic where as long as the character is moving at a speed over X they’re able to run along any surface. Not exactly that freeform, but that’s the scope of the problem. Additional limiters I’ll add are things like “Not if the difference in angle is too high” and “Only on surfaces > 130 degrees for X seconds” ; likely by slowing the player down over time.
I’ve implemented simple wall-running in a couple of test projects but those were on planar walls, on-tick raycasts, and by disabling gravity for the duration. It seemed very hacky.
I’m aware that just about any solution to this problem will likely require C++ implementation and I can probably handle it.
The major hurdle to overcome (in theory) is that I don’t want to need to replicate this at a crazy high rate or tax the cpu too hard. Similarly, I want to enable climbing along just about any surface as well - similar to Breath of The Wild. I’ve got a bunch of resources lined up that I’ll be chewing through to see if I can solve this on my own but am curious as to whether this is already a “solved problem” and Google has failed me.
Optimizations I’m already somewhat aware of:
Going fast in a networked game is asking for problems. I’m reeling this in by not allowing the player to change direction very quickly without interrupting the mechanic (and the characters move at relatively normal speeds outside of this “dash”)
Doing a per-vertex collision check is likely a horrible way to go about this; I imagine I’ll be using simple collision for both running and climbing.
Physics over networking in situations like this can be non-stable due to latency and the nature of inaccuracy for performance tradeoffs. I’m hoping to make it as forgiving and “predictable” as possible and cut out anything like gravity while this is happening. If the player is displaced or flinches or w/e they’ll just stop climbing / running or get temporarily stunned but remain “attached”. Gravity on, gravity off. Should hopefully hold up.
Animations are likely to be unfun. Hopefully not too bad. I’m sure I can find plenty of resources for this particular problem, though.
I can have the climbing system replaced / based on special interactions. I can have the wall-running only enabled by “running up purple blocks” (Super Mario World joke) and switching modes… but these implementations somewhat devalue the mechanic. I could also have it be some sort of super hop / vault rather than a run but I’m already doing that with another system and want to keep them as non-overlapping as possible. Not to mention they’re gated completely differently and meant for separate playstyles.