I am wanting to create my monsters in the video game to be able to crawl along side walls and ceilings. I have the animations for this already, but I have no idea how to allow the enemies to crawl on the walls and ceilings.
I am unable to find any tutorials for this so any help would be most gracious !
It’s very complicated.
I think easiest way to do that with BPs is to force that characters to Fly movement and imitate their wall crawl from there, maybe with some tracing to wall mesh and specific animation.
The harder way is implement specific gravity vector and use it in movement component.
Search for edge grabbing tutorials also, maybe it will be helpful also.
If I was tackling this, here’s how I would try to accomplish it - Once your AI determines it wants to climb a wall, use a sphere trace around the Pawn to get your Hit. Break your hit and get the impact normal. Use this normal to calculate the proper rotation for the Pawn. Change movement type to Flying and with a custom event and timer drive the movement (Add Movement Input) in the right direction, making sure you stick to the wall.
The biggest challenge I think is to create your own navigation solution, but once you do, it shouldnt be too hard to accomplish.
sFor one, it’s best not to use the Character base, and make it an pawn.
Characters capsule collision does not allow for easy rotation.
Then, just like cover mechanics, you have to get the normal of the wall (I’d use a sphere collision that only looks for vertical objects), rotate accordingly, turn off gravity and “attach” them to the inverse normal of that wall.
Normals push away from the surface so you need an inverse to push toward it.