Unreal Engine, Adapting to Slopes - UE4U.XYZ

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 64

  • @RMC_
    @RMC_ Před rokem +10

    Worked flawlessly in UE 5.1! Just a heads up, the "vector * float" no longer exists (see 3:20), so use normal "multiply" instead and change the Z value.

    • @vaclavjezek1600
      @vaclavjezek1600 Před 11 měsíci +1

      it does exist, just right click on the input and change the type to float

  • @studiobaxter1242
    @studiobaxter1242 Před rokem +1

    Thank you, 6 years later in 5.21 this still helped me.

  • @nukima11
    @nukima11 Před 2 lety +2

    So simple yet, I probably would have never figured this out on my own. Works for prone..Thanx.

  • @dragonfire_bane
    @dragonfire_bane Před 5 měsíci

    Thanks! works well with a few minor adjustments in ue5

  • @Narstak
    @Narstak Před 10 měsíci

    Splendide instructions. Simple and efficient. FYI, you can also make an event to lower the tick count and then smooth the movement to avoid jerking motions.
    In my case because everything is not centered around the height 0 (everything is above ground), the multiplicator Vector * float at the beggining, I put negative values so that my linetracing reach the ground from higher position and it works.
    Also adding multiple array is risky, so having something that analysing the surface under to know what kind of object you have to answer to is good, otherwise if you leave a static object and walk on an pawn floor, you won't stay at an angle.

  • @rocketpoweredchimpgamesphi7798

    Perfect tutorial, fixed ALL my rotation problems (even if I didn't entirely understand all the vector maths haha)!

  • @andrew-martin
    @andrew-martin Před 7 měsíci

    Thanks for this It worked great on my spiders in 5.3

  • @MadpolygonDEV
    @MadpolygonDEV Před rokem +1

    Can you explain how rotation from xy and xz work? People use them and dont explain them much so I was wondering if you could break down whats going on. Documentation is not great for those as well. Thank you

  • @adamkareem
    @adamkareem Před 6 lety +2

    Great, simple vid bro. Thanks for that!

  • @mhnoni
    @mhnoni Před 7 lety +6

    Really great tutorial , thanks a lot mate .

  • @JanHarcarik
    @JanHarcarik Před 7 lety +1

    same here, very useful, thanks!!

  • @devlogerio
    @devlogerio Před 4 lety +1

    Thank you, you saved me ton of time

  • @n1lknarf
    @n1lknarf Před 5 lety +1

    I wish I could like this video more than one time. Thank you very much. You have a new sub :)

    • @n1lknarf
      @n1lknarf Před 5 lety

      @mamoniem Hey there, I'd like to ask of you if you could make a tutorial on how to fix a rotation issue I'm having after implementing your code. My character has only 2 legs so I used only 1 sphere to trace the hit near the bottom of the mesh, close to the feet. Sometimes the character shows a vertical line trace but the rotation is completely the opposite... I've found that moving the camera helps update the rotation. I know it sounds vague, but I could send you a video showing you the issue, perhaps that helps understanding the issue I'm facing.

  • @zuyura5210
    @zuyura5210 Před 3 měsíci

    Unlike other videos, this atleast worked but my character only adapt when going up a slope but not down for some reason

  • @kingofthundersword
    @kingofthundersword Před 7 měsíci

    This works great I just have one question, I want to use this one something that is spinning, I am adding rotation along the z axis every tick to get this spin effect, the spinning and the leaning effect tend to not work that well together lol any advice?

  • @anvinhn276
    @anvinhn276 Před 2 lety

    Oh man i owe you !!!

  • @WhippyTrout
    @WhippyTrout Před 4 lety +2

    Great tutorial! My characters look perfect now. Thank You! :)

  • @RMC_
    @RMC_ Před 4 měsíci

    Hey man, I'm trying to this but aligning my character to walls instead of the ground, I'm too dumb to figure out how to change it to make it work.. Basically I want my character to hang from an edge and align so it's always facing the wall. Any ideas?

  • @canalscienceloop
    @canalscienceloop Před 3 lety

    Really good man, thanks for this!

  • @TheGlazedDonut
    @TheGlazedDonut Před 2 lety

    Thanks man, works great!

  • @MattyOfficial
    @MattyOfficial Před 2 lety +1

    Cheers!

  • @charlescumming9019
    @charlescumming9019 Před rokem

    So good! Thanks

  • @demian165
    @demian165 Před 4 lety +1

    I am having a little issue, if the character is on a slope and then jumps, he jumps off the slope at that angle. I am trying to reset the rotation back to his default, how would i set that up? Please help, thank youuu!

    • @WhippyTrout
      @WhippyTrout Před 4 lety +1

      I believe you would need to get the world rotation of the capsule component, then set the world rotation of your mesh to the world rotation of the capsule component. Also note: if your mesh has to be rotated 90 degrees in the viewport then you will need to add or subtract that rotation from the Yaw value before setting the mesh's rotation. Here's an example: i.gyazo.com/5cf7fa915b93534e9533c0571835611e.png

    • @demian165
      @demian165 Před 4 lety

      @@WhippyTrout i actually managed to fix it the next day lol, i appreciate the reply! Gonna keep this just in case

  • @skilatgamedev3353
    @skilatgamedev3353 Před 5 lety

    Really nice tips thank you

  • @masm3219
    @masm3219 Před 3 lety

    You could do it with LookAt rotation easier and with not this high computational costs.

  • @Seboilba
    @Seboilba Před 4 lety +1

    great tutorial but is there a way to get this to work for a 2D sprite?

    • @greengamerguy623
      @greengamerguy623 Před 3 lety

      yes and I assume easier and I assume most 2d logic would work from any other engine more or less

  • @LxNazarov
    @LxNazarov Před rokem

    Thanks a lot!

  • @AlphaOmega
    @AlphaOmega Před 3 lety

    how to get the mech character ? please

  • @FcbDavis
    @FcbDavis Před 2 lety

    Is this able to be replicated for multiplayer like being able to see others adjust to slopes too?

    • @_mamoniem
      @_mamoniem  Před 2 lety +1

      Indeed :) like any other variables. Just need to replicate the right thing.

  • @BarberFamily5
    @BarberFamily5 Před 4 lety

    I have a, shall we say, pretty fundemental problem.
    You see, the drawforobjects lines won't go straight down. What can I do to fix this?

    • @BarberFamily5
      @BarberFamily5 Před 4 lety

      The lines seem to point at a very specific spot below the map. What does this mean and how do I remedy this?

    • @_mamoniem
      @_mamoniem  Před 4 lety +1

      @@BarberFamily5 Let me say, it is common to have this issue when you first time work with this technique, or when you didn't use the line tracing in a more complex way before.
      Your issue seems that you shooting the ray to "a specific point in the world", but what we need to do is to "shoot the ray to specific direction for a specific length". Make sure to follow exactly the logic in the video, you will notice that the logic multiply the line direction with a length vector.

  • @HyperBassYT
    @HyperBassYT Před 6 měsíci

    For some reason it messes up my capsule, I have no idea why

    • @HyperBassYT
      @HyperBassYT Před 6 měsíci

      I fixed it by replacing getting the rotations from the mesh and instead the capsule component

  • @yohanismannegerew8374
    @yohanismannegerew8374 Před 4 lety

    I can't find the mechspider tab

  • @epikUnreal
    @epikUnreal Před 3 lety

    this doesnt work on different levels... why?

  • @TorQueMoD
    @TorQueMoD Před rokem

    Your audio is terrible, but this video is fantastic! Thanks for sharing :)

    • @_mamoniem
      @_mamoniem  Před rokem

      that was 6-7 years ago, my PC back then was weak and getting noisy anytime i launch Unreal 4.
      now things are different, i got a new powerful PC, which gets noisy anytime i launch Unreal 555555555 😅

  • @Rojas32
    @Rojas32 Před 3 lety

    Do you know how to do this on a Paper2D character

  • @threedai
    @threedai Před 3 lety

    Nice, but did you record into a submarine, or into a coffee maker ? lol cheers :)

  • @Tigercrafter
    @Tigercrafter Před 4 lety

    Thanks!!!!

  • @AcidAlfa
    @AcidAlfa Před 3 lety

    Hello! The tutorial is done and when I go up a hill it does rotate but it rotates a lot choppy like it's rotating in 1fps.
    Edit: I fixed it I had some wrong nodes connected

    • @williamsli3745
      @williamsli3745 Před 3 lety +1

      Haha, same here.

    • @mirceam7152
      @mirceam7152 Před 2 lety

      I have the issue and I cant for the love of me find the solution >

    • @mirceam7152
      @mirceam7152 Před 2 lety

      @@williamsli3745 I have the issue and I cant for the love of me find the solution >

    • @mirceam7152
      @mirceam7152 Před 2 lety +1

      Never mind i fixed it

  • @lethiagames9208
    @lethiagames9208 Před 5 lety +1

    didn't work for me

    • @_mamoniem
      @_mamoniem  Před 5 lety +1

      I don't know which part causing the issue for you, but try to follow along all the steps carefully, and it shall work fine :)

    • @lethiagames9208
      @lethiagames9208 Před 5 lety +1

      @@_mamoniem well here's the thing I'm using the original capsule component (inherited) for the vehicle since i dont know how to do the volume you used

    • @_mamoniem
      @_mamoniem  Před 5 lety +1

      @@lethiagames9208 the mecha too is using the inherited capsule component for collisions, the sphere volume is extra thing to detect things outside the body radius. using any is okay, it is only used to get the center point and the direction, so rays can be shot correctly.

    • @lethiagames9208
      @lethiagames9208 Před 5 lety +1

      @@_mamoniem can i use a rectangle (box collition) since my vehicle is like a rectangle

    • @_mamoniem
      @_mamoniem  Před 5 lety +1

      @@lethiagames9208 Anything should do the job, all needed, is to get the center and direction. You can even sue the car mesh, any thing that can give you "GetWorldLocation" node.

  • @flyingtruck5301
    @flyingtruck5301 Před 2 lety

    No offence. This is not too hard to make. Can you place the foots even while the up vector of the actor changing on a floor?