How To Change Gravity In Unreal Engine (Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 32

  • @MattAspland
    @MattAspland  2 ปีที่แล้ว +13

    Unreal Engine gravity values for different celestial bodies:
    Earth = -980
    The Moon = -162
    Mercury = -370
    Jupiter = -2479
    Mars = -372
    Saturn = -1044
    Uranus = -887
    Neptune = -1115
    Pluto = -62
    Make sure to subscribe if you enjoyed and want to see more!

    • @Rhoran
      @Rhoran ปีที่แล้ว

      No Venus? :(

  • @whatzthat7744
    @whatzthat7744 2 ปีที่แล้ว +1

    Really thought this was going to be a tutorial on how to set gravity like walking on walls and ceilings LOL
    Wich would be so awesome!
    Keep up the great work!!

  • @gamingarc1067
    @gamingarc1067 2 ปีที่แล้ว +1

    Haven’t got to watch this yet but I’m looking forward to it! Your tutorials are always so simple and helpful!

  • @merronmist2368
    @merronmist2368 2 ปีที่แล้ว +4

    would be neat to see the gravity change directions so I could walk on walls or dynamically change so I could walk on a sphere mid-air

    • @Yvola
      @Yvola ปีที่แล้ว +2

      This, is possible. Search “free directional gravity”

  • @Legofnafboy2000
    @Legofnafboy2000 2 ปีที่แล้ว +1

    Great video! I was wondering if somehow you can do a video on loading screens I know you did one before but I want a loading screen that changes to a different image each time a loading screen shows up like for example you loading a level loading screen pops up with a sky image and level is open then you go to a another level loading screen pops up a New image with sand and keeps doing that to how many loading screen images you have that's all I want to know and also how to have your own custom loading icon on the bottom right of your screen that's all.

  • @fictionalgaming912
    @fictionalgaming912 2 ปีที่แล้ว

    Good Tutorial Matt, but somewhat incomplete. You forgot to include the fact that most actors in a scene have a Gravity Scale variable available to them.
    For example Projectile Movement Component has Gravity variable as well to where whatever the level gravity is set to, you can set it to whatever value you want starting from 0 but it defaults to 1.0.
    For example when I want to test my projectile collision without dealing with it dipping from gravity, i set Gravity Scale to 0. This will multiple the level's GRAVITY number * Actor/Pawn Gravity Scale number and set the gravity on an individual level. You can also shortcut this by simply unticking the box "Enable Gravity".
    Same goes with the Character Movement Component, it provides that Gravity Scale variable and Boolean Enable Gravity as well.
    For each individual level you could have a different gravity set or you could have 1 gravity set throughout all the levels then simply modify the Player, or Actor's Gravity Scale Variable. If you want the character to experience ~90 gravity, then the world gravity could be set to something easy or to -960. From there take your Gravity scale variable on the character or desired actor and set it to 0.09 which gets you -86.4 gravity for the character. The world gravity does not change, but the desired Actor/Pawn Gravity Variable does.
    The method I think that folks want to do is the following:
    1. Set your level's global gravity scale (follow Matt's tutorial or experiment)
    2. Start to prototype with character's gravity scale on a per level basis.
    3. Do a print to screen blueprint node or a UE_LOG if doing C++
    4. Experiment with changing gravity based on an attack, or collision from objects (trigger volume)
    Example: Player walks into a damage volume, the damage volume does 5 damage -> adds impulse to character -> changes gravity of player to something else and sends the player floating off into the unknown.
    If we go with a tag system, it is possible that a switch statement might work if you have multiple levels and you want to declare the location of the character/actor. You would just need a trigger box to set "location" most likely multiple trigger volumes to set tags and remove old tag.

  • @spacearchitecture3606
    @spacearchitecture3606 2 ปีที่แล้ว

    Cool thanks

  • @wolfiedgr8t
    @wolfiedgr8t 2 ปีที่แล้ว

    Pretty cool Matt 👍

  • @CommanderColson
    @CommanderColson 2 ปีที่แล้ว

    Great tutorial mate. How about a balance meter similar to those in the Tony Hawk franchise (while grinding or in manual)? A pendulum-like HUD piece that keeps swinging from one end to the other, and the player has to use buttons to prevent the pendulum from hitting either end

  • @ZimCrusher
    @ZimCrusher ปีที่แล้ว

    global setting... nice, but what if you want it to change on the fly?
    And What if you want it to be just for that character? like ... he suddenly becomes a balloon.

  • @aimnone
    @aimnone 2 ปีที่แล้ว +2

    could you do a video explaining how to make different zones in the same map that each have a different gravity amount?

    • @zeita487
      @zeita487 2 ปีที่แล้ว +1

      YEA CAUSE SOME OF US HAVE MAPS WERE SOME AREAS WILL BE ZERO G AND OTHERS WITH NORMAL GRAVITY. WE CANT HAVE OBJECTS FLOATING IN NONE ZERO G ENVIROMENTS CAUSE IT BE UNREALISTIC. WE DONT COME TO TH-cam FOR CIRCES SHOWS WE COME FOR HELP WHEN NO ONE ELS WILL

    • @GatlingHawk
      @GatlingHawk ปีที่แล้ว +1

      @@zeita487 create a collision for the area, make a set of variables to check if inside the area, get character movement, and set gravity scale through there in the BP_3rd person character blueprint

    • @killerwolfZeita1171
      @killerwolfZeita1171 ปีที่แล้ว +1

      @@GatlingHawk i compleatly forgot this even existed lol its been a year

    • @GatlingHawk
      @GatlingHawk ปีที่แล้ว

      @@killerwolfZeita1171 lmao my bad

  • @v8matey
    @v8matey 2 ปีที่แล้ว

    Awesome.
    How would you make an airlock that sucks everyone outside, an then turns to zero g.

  • @jhonysteak5512
    @jhonysteak5512 ปีที่แล้ว

    Someone has a good link to do the same thing, I mean create a planet with a gravity system in order to apply all that can be done on a classic landscape but I'm having trouble finding good tutorial.
    Most of them are like this one, short and with version 4, I already know how to create the system described in the video as well as directional gravity and body attraction.
    But I'm looking to do the same thing in the landscape.
    Can we convert a sphere to a landscape?

  • @MartKart8
    @MartKart8 2 ปีที่แล้ว

    Can you do a sliding down a hill or slope, with the ability to move left and right and speed up moving forward and slow down holding back?

  • @hackzndat5794
    @hackzndat5794 2 ปีที่แล้ว

    hi how would you do this as a pickup that lasts a certain amount of time and then returns back to normal gravity?

  • @HusmanGames
    @HusmanGames 8 หลายเดือนก่อน

    Is there someone who can explain me how i can modify the world gravity via a blueprint? Like for instance I have a box collider and when I overlap it with an actor it changes the gravity

  • @POWGameStd
    @POWGameStd 2 ปีที่แล้ว

    can you make '' spam E to escape from hug/holding of AI ''

  • @MartKart8
    @MartKart8 2 ปีที่แล้ว

    A triple jump like Mario would be pretty ace.

  • @carlosrivadulla8903
    @carlosrivadulla8903 2 ปีที่แล้ว

    hello mat, may I request a tutorial about gameplay tags?

  • @andreeaArt_
    @andreeaArt_ 2 ปีที่แล้ว

    How do you do 0 gravity?

  • @williamquaresma2529
    @williamquaresma2529 2 ปีที่แล้ว

    hi, how can i change the direction of the gravity?

    • @MattAspland
      @MattAspland  2 ปีที่แล้ว

      Hey, as mentioned in the video, - goes down and + goes up

  • @HirokaAkita
    @HirokaAkita 2 ปีที่แล้ว

    I'm scared for the attrocities will show from this video XD

    • @HirokaAkita
      @HirokaAkita 2 ปีที่แล้ว

      (I mean, for what someone does from this tutorial XD)

  • @mr.generalx
    @mr.generalx 2 ปีที่แล้ว

    How To Make The Granny Horror Game