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
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.
Thank you very much
Fantastic
Great video. I've just been playing around with offset curves for ADS abilities. Loving your work Nance!
Thanks nice
Thanks!
This is great! I use a lot of regular cameras for the lag, so this is something I've wanted.
Thank you so much. Was trying to understand exactly how to implement this!
Amazing video! I've been learning to much with your videos, hope you add more, one about sprinting would be great!
This is HUGE, thank you! I was literally wondering why the camera always felt so jittery.
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!!!!
Thank you as always, your videos are really helpful always
thumbs up as usual, thank you Nance :)
Very useful, thanks!
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
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.
u are so amazing..
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
That's a great idea for a video, thanks!
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.
Oh no! I wish I published this video earlier then. This industry is full of "can't say who" 😆
@@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.
Is it possible to use camera modes to make Lyra a FPS?
Yes, @AfootGames has a tutorial on that subject at th-cam.com/video/6zXZ5nMpyU4/w-d-xo.html
Not working in 5.4..
Thank for the video
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!