Lyra's Locomotion System Explained Part 1/9 | The Event Graph | UE5

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

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

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

    Man thanks for the channel. You produce extremely detailed and quite unique videos. You helped me a lot with character movement animation. After watching, I was able to implement the things I needed in the project without any serious problems. Keep it up, you are very cool. I wish you love, harmony and kindness

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

    Great source of information for the Lyra Dev community. Thank you for your hard work and sharing your knowledge.

  • @riddma3620
    @riddma3620 ปีที่แล้ว +3

    In 36:40 the Float Spring Interp is an engine function to use a spring damper model to interp float to target value. The function signature is:
    float UKismetMathLibrary::FloatSpringInterp(float Current, float Target, FFloatSpringState& SpringState,
    float Stiffness, float CriticalDamping, float DeltaTime,
    float Mass, float TargetVelocityAmount,
    bool bClamp, float MinValue, float MaxValue,
    bool bInitializeFromTarget)
    and FloatSpringState is an engine struct:
    USTRUCT(BlueprintType)
    struct ENGINE_API FFloatSpringState
    {
    GENERATED_BODY()
    float PrevTarget;
    float Velocity;
    bool bPrevTargetValid;
    FFloatSpringState()
    : PrevTarget(0.f)
    , Velocity(0.f)
    , bPrevTargetValid(false)
    {
    }
    void Reset()
    {
    PrevTarget = Velocity = 0.f;
    bPrevTargetValid = false;
    }
    };
    The RootYawOffsetSpringState argument is passed in as an address, so the value is updated inside function execution without needing of return variable. Basically it's just a temp variable for the spring damper interp to work.

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

    Sir you are amazing for this break down. Please keep them coming!!! you have gained a suscriber with this content...... So needed it. Thank you Thank you Thank you

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

    Hell yeah! Looking forward to this. Excited to see what you caught that I missed 😄

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

    Brilliant! Could you please make a tutorial step by step on how to replicate it for a new project? It would be awesome to understand it better.

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

      Search John galt on TH-cam he has a few videos showing how to put it together from scratch and the best part about it is, it’s multiplayer replicated

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

    Right at the end there where you click on the "linked anim layer" node, in the node settings if you click the dropdown and select the "instance class" (anim layer library) this will allow you to double click on the node and will take you directly to the corresponding layer in the library, very handy, don't forget this is via the anim layer interface, which is where you create the layers to appear in the library and allow access from the main AnimBP.

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

    Thanks for going over this. It was helpful!

  • @AndreyShu
    @AndreyShu 7 หลายเดือนก่อน

    great explanation, thank you much!

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

    This has been great, thank you for making it

  • @CoderQuest-mn8sh
    @CoderQuest-mn8sh 3 หลายเดือนก่อน

    Wow awesome job thank you so much!

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

    I fucking love how detail this is

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

    i coukdn't wait that momnet when i start to watch all of this videos) thanks for your work! i want to use this locomotion system in my future game, hope i will understand everything even for making another animations for system)

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

    amazing tutorial series. thank you so much for this

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

    I learned a lot, thank you for making the video!!!

  • @illyay1337
    @illyay1337 11 หลายเดือนก่อน

    I ran into a flaw with their wall detection algorithm. Sudden changes in direction can be detected as wall blocking because the velocity is still going in the previous direction for a bit while acceleration is now going in the new input direction. It takes time for the velocity to accelerate in the new direction.
    There might need to be a tweak to take into account the previous acceleration direction as the velocity accelerates in the new direction. This ended up causing a noticeable jerking/twitching in one of my animations that I was debugging. Maybe it's better to check against the current acceleration and a second smoothly interped value of the acceleration direction that lags behind a bit.
    In hindsight it's obvious but not immediately obvious. In some cases it might not even be a problem to be off for a few frames since animations might not have time to blend in/out yet. It's just in my implementation I had this issue.

  • @ebenkanga2221
    @ebenkanga2221 12 วันที่ผ่านมา

    I start smart enemy AI tutorial in Lyra project but the issue is the enemy doesn’t play the montage….I’ve been trying all day but still….is there something in the Lyra project that is causing this issue

  • @daniloB225
    @daniloB225 11 หลายเดือนก่อน

    where exacly are the node that made the character move? this is a animation blueprint, so it only manages animation right?

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

    Great tutorial. You are really great at breaking it down and explaining. I am curious how your C++ is. Would you be able to do this with non-blueprint code? If so I could really use you help. I have source code from Paragon I have been trying to disect. Specifically for their kill cam functionality. If we could figure out how to get this implemented, I think it would be a game changer for many UE Indie Developed games, as this is not something we'll covered anywhere. Thanks in advance. Let me know and I can send you the Cpp and Header file. Thanks in advance.

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

    hey thanks man! do you know where I can find a way to get prone added into Lyra?

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

    Hi, I have this strange bug in Lyra, I had to manually retarget almost UE4 skeleton to UE5, it was basically really a UE4 skeleton but somehow out of the box retargeter in Lyra was messing it up. I am sure (after 2 days of checking) that I retargeted it properly (in the preview it's all perfectly fine), but when I use montage from it in editor play the animation won't transfer to lower body and feet want to stay attached to the ground where they were before montage started (lower body points to the starting position when the upper body follows the root motion of the animation) and eventually when animation ends the character position in the world is returned to where it was before the animation. Animation is has root motion, enable root motion is checked. For the test I retargeted other regular UE4 skeleton to UE5 using out of the box retargeter (it worked with this one) and animation with root motion played fine, but when I have redone it manually with custom retargeter (also in preview all ok), it also had root motion in the lower body broken - lower body not following the animation, foot wanting to stay attached and position reset at the end of the animation. Any idea what that might be? I tried disconnecting the Control Rig for foot placement in Anim Graph (maybe there are more than one? but it was running when in play mode) still no use. Is it something in Lyra animation BP, or maybe it is some kind of a bug? Works in preview, but not in play mode?

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

    Thanks!

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

    Thanks!

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

    Excuse me but could you tell me how to get the ItemAnimLayerBase Ref in ABP_MannequinBase?

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

      While you could do that, it dies go against the methodology/setup of the system. I can sit down and put together a function tomorrow and get back to you then, as I'm low on time now. What are you trying to do? I might be able to come up with a simpler approach.

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

      The problem is some of the detailed approach was write in the ItemLayerBase which contains Slot to play montage.But the call function logic(such as play slot animation as dynamic montage) was sit in ABP_MannequinBase,so I have to get the ItemLayerBase ref to set as the Target.But I have fixed the problem now,so thank you all the same bro!
      BTW, Do you know if there has an quick way to communicate between Thread-safe function and the event graph logic? I founnd it bothered me for a long time especially when I need to call an "play montage"logic in the thread safe function,quite a pain...(I have tried the interface message way but it wont help)@@OutcastDevSchool

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

    can i use lyra anim bp for like a completely different skeleton? can you give tutorial?

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

    Why the first tick check is not done at the start of functions like "update location data"?

    • @gladman.stories
      @gladman.stories 2 ปีที่แล้ว

      Same question here... Very weird actually.

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

    I am a game designer and I want to Learn Lyra, use lyra to make some multiplayer TPS prototype, this tutorial is really help! thanks a million!

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

    Subscribe First。 Seems pretty good!

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

    Is lyra locomotion better than echo?

  • @3sgamestudio
    @3sgamestudio 2 ปีที่แล้ว

    4:23 in first tick set to zero... why not use anim init? why not set their defaults to 0 instead of this?

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

      Any ideas why one would calculate the "displacement speed" like they did, rather than just taking xy length of actor/pawn velocity? Lots of really confusing stuff in Lyra animation...

    • @3sgamestudio
      @3sgamestudio 2 ปีที่แล้ว

      @@1982pwr no clue. theres no advantage really. "get member" can as well get vector. maybe they had issue getting vectors length with single node? but still if you're running calculations why not make a thread safe pure function getting the velocity length vector. (or xy only length vector of velocity)
      in general lyra thought me a lot of things how to do...
      but even more of what NOT to do :/

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

      @@3sgamestudio I'm beginning to understand why your tutorials are so bad.
      They get the actual displacement rather than velocity because they want to know how far the pawn moved since last frame, not its velocity this frame. Those can be, and frequently are, different values based on various obstructions and parameters.

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

      Again, you should really check twice before making a mocking comment.
      They do set the defaults to zero, which has the same effect as setting them to zero in the Anim Init.
      But the values they calculate in UpdateLocationData require the current position and previous frame position. If they were to store the previous frame position in Anim Init, any character teleported after construction would have incorrect stored last position data.
      So they calculate the displacement and displacement speed the same way every frame, and they discard the first frame of data. It's a completely reasonable approach.

    • @1982pwr
      @1982pwr 2 ปีที่แล้ว

      @@jhonnyappleseed1786 I was asking about the displacement speed (also a variable in Lyra), not displacement itself.
      How exactly can displacement length / delta differ compared to taking magnitude of pawn velocity? I don't really know how pawn velocity is calculated internally, though I'd think it's exactly something like what's being done here... displacement across frame / delta.

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

    Up

  • @3sgamestudio
    @3sgamestudio 2 ปีที่แล้ว

    3:25 sooo it gets movement component.. being of class movement component.. nad cast it to movement component? what the... why not valid check? it seems like it was set up by some noobs.

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

      APawn::GetMovementComponent returns a UPawnMovementComponent. UCharacterMovementComponent is a child of UPawnMovementComponent, that is why they cast it. The noob here is you.

  • @DimitryArsenev
    @DimitryArsenev หลายเดือนก่อน +1

    4+ hours... its looks very not userfriendly system...

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

    Bruh, why his face look like a deepfake?

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

    Regarding the float spring interp. Check file KismetMathLibrary.h line 111. Has float PrevTarget, float Velocity, bool bPrevTargetValid.