Announcement

Collapse
No announcement yet.

Help: Custom gravity for each mesh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Click image for larger version

Name:	e1d0cab5ff5f10ab6626d271eece5153.jpg
Views:	1
Size:	174.4 KB
ID:	1144150

    #2
    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: https://forums.unrealengine.com/show...ound-a-loop%29
    KITATUS
    "Information shouldn't be behind a paywall, It should be free for all!"

    Comment


      #3
      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).

      Comment

      Working...
      X