Unreal Engine 5 Tutorial - Custom Gravity UE5.4 Preview

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • SUPPORT ME
    Patreon I / ryanlaley
    Buy Me a Coffee I buymeacoffee.com/RyanLaley
    Donations I paypal.me/ryanlaley
    PRIVATE 1-2-1 SESSIONS
    Email me at support@ryanlaley.com for more information and rates, or visit www.ryanlaley.com/sessions
    JOIN THE COMMUNITY
    Discord I / discord
    FOLLOW ME
    Twitter I / ryanlaley
    Facebook I / ryanlaleygames
    Instagram I / ryanlaleygames

Комментарии • 31

  • @elcid2651
    @elcid2651 Месяц назад +4

    I implemented something similar to this using the Pawn class in an earlier version of UE. To get the camera and movement working like in standard "flat" gravity, I needed to derive the movement vector by making a Right vector from the camera's right and the Actor's Up vector, and a Forward vector from the camera's forward and the Actor's Up, and then apply them as 2D input into the movement component. I think the only drawback was that I had to limit the camera so it never goes quite to 90 degrees above or beyond the player, but aside from that, it was a pretty solid foundation for the rest of the movement logic.

    • @kkayaoglu
      @kkayaoglu Месяц назад

      Hello, I designed a similar system too on my project. Can you share blueprint screenshots if possible?

    • @elcid2651
      @elcid2651 Месяц назад +1

      @@kkayaoglu I don't know how to share screenshots on RUclips unfortunately, and it's a bit of a mess anyway (unfinished project). I can more or less describe it to you though: For the right movement vector I'm taking the forward vector from a rotator 'Make Rot from ZX' in which the Z value is 'Get Up Vector from Actor' and the X Value is the forward vector from a 'Make Rotation from X Vector' from the Camera's right vector. NOTE: I'm not actually using the camera's vectors, because I found these unreliable, so instead I attached Arrow components to the camera, and used their X vectors to get the camera's Right and Forward vector. The forward movement vector is pretty much the same thing, except I used the camera's forward vector: So I took the Forward vector from a rotator 'Make Rot ZX' in which the Z value is 'Get Up Vector from Actor' and the X Value is the forward vector from 'Make Rotation from X Vector' from the Camera's forward vector (the forward vector from the Arrow component attached to the camera). As mentioned before, it doesn't hold up if the camera goes above 90 degrees, so I had a function to limit camera movement to just below that, and also I ran into issues whenever I enabled camera lag, though that may have been down to how I implemented my combat system. Anyway, hope that helps. If you know a way to upload screenshots, let me know!

  • @wii58739
    @wii58739 Месяц назад +1

    Looks really dope!

  • @enderlive5339
    @enderlive5339 Месяц назад

    Thank you man, was hard to figure out for me, much appreciated !

  • @TorQueMoD
    @TorQueMoD Месяц назад

    Cool new feature! Thanks for the tutorial :)

  • @MgamingStudios
    @MgamingStudios Месяц назад

    This is awesome I planned on make a space based game soon 🙌

  • @Eric_Heberling
    @Eric_Heberling 20 дней назад

    Great video. I'd be interetsed in inverse gravity. Like in a space wheel, cylinder or ring world.

  • @kemo_l7350
    @kemo_l7350 Месяц назад

    Good luck with the new version of gravity systems

  • @keithcollier4860
    @keithcollier4860 Месяц назад

    Well.. thats awesome! As much as I hate flip-flopping between engines, looks like I'm going to need to test run UE some more.

  • @present_artist1033
    @present_artist1033 Месяц назад

    Really cool! How might you detach back to the ground?

  • @souhaibbenchaker4824
    @souhaibbenchaker4824 Месяц назад

    For the movement with the camera, you can project the right/forward vector of the camera on to a plan with a normal that is negative of the gravity direction then normalize it.
    Also is there a way to use this new node with something other than a pawn? For example a mesh that has simulate physics enabled? That would be soo cool!

  • @boombyte8849
    @boombyte8849 Месяц назад +2

    Biggest problem with this--there are no nav mesh for that.

  • @xiaoyuwang9940
    @xiaoyuwang9940 25 дней назад

    Hello, I followed your video and have a question about the Event ActorEndOverlap section. Why do we first check if the actor's class belongs to BP_GravityField, and then use the Cast Failed pin from the Cast To BP_GravityField node? Aren't both of these steps for clearing the Current Gravity Field when the overlapping actor is not a gravity field? Thank you so much!

  • @user-fd4nq8ej4n
    @user-fd4nq8ej4n 26 дней назад

    WOW!!! This is really great! Thank you so much! It's so cool! But how can we make the character's animation more natural when the gravity switches? Right now it looks more like the character changes position instantly, how can we give the character a smooth rotation?

  • @MikhailHudon_ZerithFarron
    @MikhailHudon_ZerithFarron Месяц назад

    so this is essentially a quick native way to get something akin to Sonic wall and ceiling running?

  • @elcid2651
    @elcid2651 Месяц назад

    I haven't downloaded 5.4 yet, but I'm a bit skeptical that this carries over to ragdolls. Will this work on non-Character class physics objects, I wonder?

  • @SOTFletsPlay
    @SOTFletsPlay Месяц назад

    how can I do that the camera follows, and if I am on the other side of the how do I it that my camera isnt upside down

  • @thefuppits
    @thefuppits Месяц назад

    Thank you Ryan!

  • @carlosrivadulla8903
    @carlosrivadulla8903 Месяц назад

    How do you see the new nodes added in each release? They are not included in the note patch.

  • @fhajji
    @fhajji Месяц назад

    Finally Custom Gravity! Thank you so much for this video. Could you also make a tutorial on custom gravity inside an O'Neill Cylinder?

    • @Eric_Heberling
      @Eric_Heberling 20 дней назад

      I 2nd that motion.

    • @CruelCrusader90
      @CruelCrusader90 3 дня назад

      i think you can get this result by multiplying the field vector by -1. this way instead of pulling you in it would send you out.
      im new to UE and havnt tested it, but that's my assumption. >.>

  • @kemo_l7350
    @kemo_l7350 Месяц назад

    How do I make zero gravity Eva spaceman mechanics?

  • @WarWulf778
    @WarWulf778 Месяц назад

    I could have used this when i was developing my first game. It was an asteroid survival game lol

  • @TheModExperiment
    @TheModExperiment Месяц назад

    I've been wanting to implement gravity for a long time. If this is only possible on 5.4, then should I move the project from 5.1.1?

    • @MgamingStudios
      @MgamingStudios Месяц назад

      You should be ok trying to implement this system I’ve followed some tutorials that were using 4.27 and older and I haven’t had any issues

    • @TheModExperiment
      @TheModExperiment 26 дней назад

      @@MgamingStudios I watched a video from CodeLikeMe and he uses C++ there. This doesn’t suit me at all, I just broke my project (it’s good that I like to make backups)
      The rest of the tutorials don't work, or they work very sadly. So I'm thinking about moving the project to a new version of the engine when it's stable

  • @a.s.b.
    @a.s.b. 17 дней назад +1

    will this work for any physics object?

    • @RyanLaley
      @RyanLaley  17 дней назад

      No only characters. For physics you basically have to do it old school add make your own physics code to allow gravity in different directions