Line trace perpendicular to hit surface

Hi!

I’ve been stuck on this one for quite a while now, trying to make some kind of futuristic quantum levitation/maglev racing game. As a matter of fact, I’m as stuck as a gecko lizard on a wall.

Anyhow, if it’s possible, the vehicle should be able to have a rotation perpendicular to the surface it levitates on (already works fine, up to ±90°) and keep a specific distance from the surface the line trace hits (for example 400 units). Kind of like the F-Zero or Wipeout games.

My setup right now fails when the surface has a rotation of over 90° (also freaks out at some angles). I’m using the actor location vector, the hit normal and I mirror it by the normal (?). Like this:


.

I’ve got a line trace facing down on the Z-axle which gives me a hit normal vector. I want to use this normal and the position of the actor to make it stick to the mesh that the line trace hits. Like this picture, with loops, in 3D.


I appreciate any answers. Thanks and have a great weekend!