Download

How to make a character -stick- to a mesh that he's walking on.

I am trying to get a vehicle to stick to a surface as if it was riding along a magnet. This means that as long as its wheels are on a valid floor, it will follow that surface without problems. If there is a slope that leads it to climbing a wall, it should be able to do that just fine.

The problem I’m running into is a few things.

I can understand that you would want to fire a ray cast downwards. And get the surface normal to orient the vehicle. But how would you ensure that the vehicle treats the wall like a normal floor? So In otherwords, while the vehicle is attached to a wall. It’s forward velocity carries it up the wall, or in circles without ever being effected by gravity, or floating away from said wall?