I’m trying to develop a locomotion system for a spider game that will allow the player to walk on all surfaces (floors, walls, ceilings, etc.) seamlessly using an Unreal Engine Blueprint. Right now I’m having trouble getting it able to walk around sharp bends like in the attached photo.
I’m using a set of line trace by channel to find the normal of the static mesh directly in front of the spider, I multiply that normal by negative one so it points inwards toward the mesh which I set to be the new direction of gravity which allows the spider to stick to ceilings and walls fine.
The main problem is getting it to go around sharp bends. Right now I have it set up so that if the first set of line traces (Red) doesn’t connect with anything than a second set (Blue and Yellow) shoots out to detect the ledge in front of the spider. If I use the second set to set the direction of gravity than the spider will go flying back into the sky.
I’ve tried using the teleport blueprint node to get around corners but it leads causes the movement to feel too jagged and snappy.
I’ve seen some people set the default movement from walking to flying in the character movement component but I’m not super clear on how to implement it.
Does anybody have an idea as to how I can get it to move around corners seamlessly? Any guidance or criticism would be greatly appreciated.