Help on creating a Spider Navigation System

Hello guys,

I’m working on a proof of concept which involves a Spider character. I’m trying to create a navigation system in which the spider can walk over any surface. I’ve used the line trace system but apparently, it seems pretty unstable so I was wondering if there is any other method or if I’m doing something wrong.

Basically, the spider aligns to the surface, but not always straight. And after the alignment with the first surface, if it meets another surface it doesn’t align to it as if it is not able to add the second rotation to the first one.

I’m not a professional coder, so I’m sure there is a lot I’m missing, but I’m working hard on learning it, so I would be very happy if anyone can help.