Help: Custom gravity for each mesh

Hello to all, a newbie on UE4 here.

I’ve been watching a lots of tutorials on the UE4 youtube channel and i decided to start making a wipeout based game, the problem i’m facing is that i don’t know how to give to the ship a custom gravity center for sticking to the track (as the magnetic track on WO) based on the orientation of the mesh to avoid the ship falling in to the “void”.

Here is a little explanation of what i’m trying to do.


Get trace down > Add force? - If you remove gravity completely and use either add force or something similar, you could create a fake gravity. Then trace below the player and if they are on the track, add force. If not, then make them fly off or something? :>

I learnt this method AGES ago with this thread:

For a track I might even try to find a way using overlaps to specify the down direction when the ship is inside that overlap.

I’m not entirely sure how you’re making your track but you might just have each track segment actor or component contain a unit vector variable that specifies which way is “down” for that segment of track and when the ship is inside of its range it applies a force in that direction of whatever magnitude you use for gravity (980 I would guess).