UE5 add camera lag to Lyra's Camera modes same way as the spring arm component!

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ค. 2024
  • Smooth your camera movement with position and rotation camera lag just like for the spring arm component.
    Lyra doesn't use a arm spring component (which supports camera lag), but uses camera modes that can switch to and from each other. It allows better fine tuning for where we want our camera to be based on camera mode data.
    In this video: we take the logic for spring component, keeping the same named variables so it can be tweaked the same way, add the logic to the third person camera mode class. Reach the wanted look and feel for your camera modes!
    Github Project code files at : github.com/NanceDevDiaries/Tu...
    Some C++ required
    Engine version : Unreal Engine 5.3
    Project based off : Lyra Sample Game 5.3
    Thanks for watching!
    Join my Patreon to get video credits and if you'd like to give thanks!
    / nancedevdiaries
    ---------------
    Timestamps:
    00:00 - Intro
    01:18 - Add the code
    04:56 - All the existing camera modes
    07:51 - Tweak and debug camera lag parameters
    10:07 - Tweaking offset curve to not aim at back of head
    13:39 - Improving input lag based on pawn's rotation settings
    14:50 - Slow lag example

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

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

    This is so interesting. Lyra has been out for a while now and ive never heard of anyone say they don't use the spring arm component.

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

    Thank you very much

  • @FelipedPaulaSantos
    @FelipedPaulaSantos 6 หลายเดือนก่อน

    Fantastic

  • @MisterMoot
    @MisterMoot 6 หลายเดือนก่อน

    Great video. I've just been playing around with offset curves for ADS abilities. Loving your work Nance!

  • @ANUBIS_game_dev
    @ANUBIS_game_dev 4 หลายเดือนก่อน

    Thanks nice

  • @nfrancisj2122
    @nfrancisj2122 6 หลายเดือนก่อน

    Thanks!

  • @Astaraa
    @Astaraa 6 หลายเดือนก่อน

    This is great! I use a lot of regular cameras for the lag, so this is something I've wanted.

  • @eaceaser
    @eaceaser 5 หลายเดือนก่อน

    Thank you so much. Was trying to understand exactly how to implement this!

  • @wido1801
    @wido1801 6 หลายเดือนก่อน

    Amazing video! I've been learning to much with your videos, hope you add more, one about sprinting would be great!

  • @brumakriders
    @brumakriders 6 หลายเดือนก่อน

    This is HUGE, thank you! I was literally wondering why the camera always felt so jittery.

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

      Got it in my game already and found a setting I love. I have a horse mount in my game, and naturally my character moves up and down on the horse as it rides, it would cause the camera to jitter up and down a lot, but with the lag it literally has my camera feeling SO SMOOTH!! Only have it on like .025 seconds of lag too. Thank you!!!!

  • @djkwon9999
    @djkwon9999 6 หลายเดือนก่อน

    Thank you as always, your videos are really helpful always

  • @kryogenicgames
    @kryogenicgames 6 หลายเดือนก่อน

    thumbs up as usual, thank you Nance :)

  • @tomscodeshk
    @tomscodeshk 6 หลายเดือนก่อน

    Very useful, thanks!

  • @user-xz6li7pg8q
    @user-xz6li7pg8q 6 หลายเดือนก่อน +1

    in the line 22 in the cpp must change
    this:
    ULyraCameraMode_ThirdPerson::ULyraCameraMode_ThirdPerson()
    to:
    ULyraCameraMode_ThirdPerson::ULyraCameraMode_ThirdPerson(): bUseRuntimeFloatCurves(false), bEnableCameraLag(0),
    bEnableCameraRotationLag(0),
    bUseCameraLagSubstepping(0),
    bDrawDebugLagMarkers(0),
    CameraLagSpeed(0),
    CameraRotationLagSpeed(0),
    CameraLagMaxTimeStep(0),
    CameraLagMaxDistance(0),
    AimLineToDesiredPosBlockedPct(0)
    otherwise dont work

  • @BenderBendingRodriguezOFFICIAL
    @BenderBendingRodriguezOFFICIAL 5 หลายเดือนก่อน

    Oh my goodness I've been looking for something like this for a month, I'm trying to make a resident evil 4 mockup and the camera lag is essential for that feel.
    However, the code for the header file didn't work. I also noticed that there were missing quotations for the category lag names.

  • @user-xz6li7pg8q
    @user-xz6li7pg8q 6 หลายเดือนก่อน

    u are so amazing..

  • @iMeThOdZzz
    @iMeThOdZzz 2 หลายเดือนก่อน

    what about making a free-mode third person camera? How do you think that could be achieved? For example, the camera can be freely rotated despite wherever the player is moving

    • @nancedevdiaries
      @nancedevdiaries  2 หลายเดือนก่อน

      That's a great idea for a video, thanks!

  • @unrealdevop
    @unrealdevop 6 หลายเดือนก่อน

    I did a job for some people trying to make a game from Lyra at one point (Can't say who), and the guy reviewing my work kept saying the landings were jolting and needed to be smoother....I tried to explain to him that it wasn't the animation it was the camera and that Lyra has a Rigid camera and that they needed to have their coders add dampening support for the camera.....he said he would tell them but they never fixed it and he kept blaming me for it lol.
    Basically though he was complaining about the animation when going up stairs and when Landing and Vaulting. I kept telling him it was the camera...it was really aggravating.

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

      Oh no! I wish I published this video earlier then. This industry is full of "can't say who" 😆

    • @unrealdevop
      @unrealdevop 6 หลายเดือนก่อน

      @@nancedevdiariesYeah at the time I just wasn't familiar enough with C++ to do it myself or I would have. I'm trying to learn C++ now though on the side.

  • @Ares9323
    @Ares9323 5 หลายเดือนก่อน

    Is it possible to use camera modes to make Lyra a FPS?

    • @nancedevdiaries
      @nancedevdiaries  4 หลายเดือนก่อน

      Yes, @AfootGames has a tutorial on that subject at th-cam.com/video/6zXZ5nMpyU4/w-d-xo.html

  • @UnrealProfessor
    @UnrealProfessor 18 วันที่ผ่านมา

    Not working in 5.4..
    Thank for the video

    • @nancedevdiaries
      @nancedevdiaries  17 วันที่ผ่านมา +1

      Let me check, I've updated and fixed the rotation lag in a 5.4 project, and am planning on making an updated video. Curious to see what's the difference from the 5.3 project and 5.4. Thanks!