Hello,
I am trying to create a wallhugging/walking system essentially identical to the one found in the 2003 game Indiana Jones & The Emperor’s Tomb, wherein pressing an input next to any wall surface will attach the player to the wall and allow smooth movement around corners. (See linked video for reference.) My first instinct would be to do this with a line-trace of some kind, however I’m having a really hard time figuring it out. I can get the player to attach to a wall by sphere-tracing on input-pressed and constraining the player movement to a plane set by the normal of the impact point. And it works in theory, however the system quickly falls apart when trying to round corners. I can almost make it work on inner corners by way of line-tracing back and to the right/left of the player and updating the planar movement & rotation based on that line-trace, but it’s very broken and glitchy. I have absolutely no idea how to approach the rounding of outside corners. (See the second video reference) I’ve attached 2 screenshots of my blueprints. One portion is firing off the button press, and the other portion is firing on a tick only when player is attached to the wall. I’m not so concerned about the animation side of things for the moment, unless someone savvy thinks it could be done with root motion or something.(I was going to use a blendspace rather than montages etc. as the player should maintain full control of movement while attached to the wall). I would be very curious to know if anyone has an idea to how this could be done properly, and would appreciate any suggestions.
Thanks in advance!
Reference for what I want: https://drive.google.com/file/d/1BJZqdNDv8fbMHLnTTpM77CaMw2rKvcCb/view?usp=sharing
The messy mess I currently have: https://drive.google.com/file/d/1Wju4-DoHZAdkAau4q_dxQequiF7895aT/view?usp=sharing