Car to Lyra Character and back again UE5 Lyra tutorial : Possess a car part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2024
  • In this tutorial, we'll possess a car then unpossess back to the lyraCharacter. I'll go through some of the hurdles one step at a time. You'll be able to possess anything after this tutorial! It took me a while to figure out the ability inputs and cosmetics component changes required to make the basic Possess() logic work. One step further would be to attach the player to the car. Dev on!
    This is a part 2 of this video : • Possess a car in a UE5...
    Github tutorial code: github.com/NanceDevDiaries/Tu...
    Issue around Chaos Vehicles not stopping movement on unpossess.
    forums.unrealengine.com/t/sto...
    Astaraa's tutorial about cars and input forwarding
    dev.epicgames.com/community/l...
    Engine and project version: 5.2 Lyra Starter sample project
    Join my Patreon to get video credits and if you'd like to give thanks!
    / nancedevdiaries
    Thanks for watching!
    ---------------
    Timestamps:
    00:00 - Intro
    01:01 - Setup spawning as players
    05:02 - Setup Pads for possess on overlap
    12:53 - Repossess the character
    27:38 - Chaos vehicle movement doesn't stop on unpossess
    27:43 - Fix Input Not Working On Repossess
    41:06 - Fix Cosmetics not showing up on unpossess
    50:51 - Stop Spawn VFX from happening on repossess

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

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

    Wow!!! Thank you for all the videos! It's incredible how much time you've saved me haha. I'm going to try and make a system to how you can hack and possess enemies in Nier. We'll see how it goes!

  • @3BEEZ
    @3BEEZ 11 หลายเดือนก่อน +3

    Finally getting to grips with UE and Lyra. I have now been able to posses and drive my car and get out at the point where the car stopped without using the Possess Pad. With that momentum I've been able to figure out animations for entering, driving and exiting, adding dynamic engine sound, skid marks and smoke etc. So, thank you to NANCEDEV and the other content providers who's tutorials I have stitched together make this (among other things) work.

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

      Could you link us to some info on how you bypassed the possess pad and set up the animations for entering, driving, and exiting?

    • @3BEEZ
      @3BEEZ 9 หลายเดือนก่อน

      @@colinfernandez3D I used Math B for the vehicle effects 👉🏽youtube.com/@JX53YT?si=31VIbOj7MCqdF5FM
      If you think about it the possess pad is no different to a box collision so add one of those to your vehicle, copy the BP from the vehicle posses pad and place it in the event graph of your vehicle BP, change the starting node to On Component Overlap from the newly created box connection.
      Your character will now be standing in the car so you need to add an animation so it’s sitting..
      Other things to consider are (1) replication for the enter/exit and driving animation , (2) updates to ensure AI characters can’t possess the vehicle . There are quite a few tutorials out there on this you just have to stick them together.
      You still have to set other-pawn to posses to “instance editable” as you will need to select the vehicle to posses once you drop it into the level ; just as you would have if you were using the pad.
      I also added some extra nodes to the repossess player ( as per NanceDev) to allow the player to exit the vehicle
      Don’t think I can add screenshots here but will see what else is possible

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

    You are truly the lifeline to those of us building on the Lyra Game template. Thank you for the all the work you put it.

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

    another lovely video. Thank you Nance and i hope last video part where player is placed in car and when unpossesed it spawns again on last car location. I believe it was lot of headache already :D

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

    Your explanations are crystal clear. Thank you for your videos.

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

    How awesome! Thank you Nance. I will try this out next week. And I did find out after I asked you about this that Lyra does do things differently than regular UE4 or UE5. I guess I shouldn't be too surprised about that. 😊

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

    Thanks for all the hard work

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

    Thanks for your amazing tutorial, love you, you are my angel

  • @Kiran.KillStreak
    @Kiran.KillStreak ปีที่แล้ว

    Thanks for the lesson.

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

    Thank you for this one. Looks like returning the character parts is now handled in UE5.4. Keep up the good work.

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

      can you elaborate on that?

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

      @@lerovel I didn't finish the chapter at 41:06 but I can respawn with all parts.

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

      @@LFA_GM I could too enven change weapons but no movement since Ability System gets buggy after regular possesion on non LyraPawns I could only get movement after doing nancy changes in Lyra classes to reinitialize ASC, I still got a bug that players health gets back to 100 if he possesses the vehicle damaged, since the implementration resets the lyra player

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

    Another great video thank you

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

    After a week of summing up the courage to face my nemesis C++ I finally gave this a go.
    Using 5.0.3 and its not always as straight forward as following the tutorial. So far everything works (except stopping respawn on reposses). This might be due to Status_Repossessed in LayraHeroComponent .cpp. As such do the following lines need to be changed for 5.0.3
    1) LyraPS->GetLyraAbilitySystemComponent()->SetLooseGameplayTagCount(LyraGameplayTags::Status_Repossessed, 1);
    2)LyraPS->GetLyraAbilitySystemComponent()->RemoveLooseGameplayTag(LyraGameplayTags::Status_Repossessed, 1);
    Aditionally creating the Global Variable in 5.0.3 seem different as LyraGameplayTags.h is materially different.
    Here's what I have to insert instaed of the Githib code:
    1) FGameplayTag Status_Repossessed; (in LayraGameplayTags.h)
    2) AddTag(Status_Repossessed, "Status.Repossessed", "Target has repossessed, not died."); (in LayraGameplayTags.cpp)
    Any help on this bit would be appreciated.

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

      Thanks for sharing for others using 5.0.3! Yes, the Lyra gameplay tags are global/static in, I think, started 5.1 if I remember well.
      If you have the space, you can compare lyraGameplayTags with a fresh 5.2 Lyra project. There's also a Lyra github from Epic if you don't want to download it all and just see.

    • @3BEEZ
      @3BEEZ ปีที่แล้ว

      @@nancedevdiaries Will look into it, everything works except stopping the respawn effect when exiting the car. The only errors are "Status::Repossessed" in the lines below, if deleted the code Runs/Builds successfully, if worst came to worst I could live with the respawn effect when exiting the car.
      1) LyraPS->GetLyraAbilitySystemComponent()->SetLooseGameplayTagCount(LyraGameplayTags::Status_Repossessed, 1);
      2)LyraPS->GetLyraAbilitySystemComponent()->RemoveLooseGameplayTag(LyraGameplayTags::Status_Repossessed, 1);

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

    Yes, you're so amazing!

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

      This is afoot games btw 😂

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

      Oh, hey, @Afoot games ! Thanks, Glad to see you're doing well and more Lyra videos!

  • @vachetorosyan7235
    @vachetorosyan7235 19 วันที่ผ่านมา

    👍👍👍👍👍👍👍👍

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

    Hey this is very cool! I ran into a couple of issues trying to make this work in Client mode. One is that it seems like all lyra characters are always Blue now and team colors are not correctly applied. Any tips?

  • @Astaraa
    @Astaraa 10 หลายเดือนก่อน +3

    27:20 To stop vehicle movement on unpossess, on EnhancedInputAction -> Completed -> Delay 0.2 -> StopMovementImmediately. StopMovementKeepPathing also works. I haven't tested the car but it should have the same result.

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

    hi , thanks for your video
    i want add horse riding to lyra like redDead, lyra character can attack while riding, can you take me some information about that ?

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

    I've started to notice after repossessing, mouse sensitivity is multiplied. If you go into options and make it 0.1 (really slow), possess (still slow), then unpossess and it should be faster. Possess a few more times and it's out of control. (I'm using a character movement based vehicle (not a car) but I'm guessing this isn't unique to me?)

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

      That's interesting! My first guess is the game setting for mouse sensitivity is being reapplied and stacked (additive somehow, not multiplicated). Is any other setting like gamepad sensitivity behaving the same way? I haven't had a chance to check it out, I'm curious :)

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

      ​@@nancedevdiaries I found it only happens as Client. But also I have to run `Reset Player Input after Unpossess` on server call AND on Remote (with delay) otherwise input doesn't come back. It looked like your client didn't need `Reset...` on client/remote, and was able to shoot? Not sure. So I wonder if it's something I missed or ue5.3. My setup is a little different.
      As client...
      If I only run `Reset...` on server, I think my abilities come back (server + client), but no input. (Unable to shoot. Movement is fine.)
      If I run it only on remote, abilities come back for client only, and input works. (Abilities become strange because not active on server.)
      If I run it on remote and server, abilities come back on both, and input works. BUT sensitivity stacks.
      As server...
      Only runs Auth. Everything is fine.

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

      Adding a bool OnlyAbilities (to skip InitializePlayerInput) and checking that on my Remote call to `ResetPlayerInputAfterUnpossess` seems to solve all of it. 🤞
      So my client needed everything but InitializePlayerInput to also run on client/remote. Including that caused some kind of input stacking.

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

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

    can we have swiming part 2 please or somthing similar to damage types and resistances !

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

    Maybe in the future you should try with matrix demo cars the have a BP and animation for getting in and stuff

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

    But what if the car has some abilities, Like guns, boost etc ? can we let the ability system on and change to the car's abilities ?

  • @3BEEZ
    @3BEEZ 10 หลายเดือนก่อน

    Used your Exploding Barrels tutorial to damage the vehicles unfortunately the player does not respawn if in the vehicle when it explodes. I assume this is because he is still possessed by it. Need some assistance in getting the player to respawn if they died while in the vehicle when it explodes. thanks.

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

      Hey! I'm refreshing my memory, what you could do is on the car's EndPlay you can run the same logic that's ran when you press the unpossess key.

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

    I have a very simple input forwarding component, it’s also pretty neat

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

      Is there anyway I could see what you did? Are you on the Lyra dischord?

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

    Hey Nance. Are you currently working with a game team? We’re a small team of 6 in the indie space looking to add another developer with good Unreal skills and who enjoys working in many different systems (Controls, Cameras, AI, Animation, GAS, etc). Would you be open to chatting about joining our little Unreal indie game project? Thanks!

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

      Hey Dustin, yes I'm happily employed, wishing you all the best to your indie project and team!

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

      Thanks, Nance. Best of luck with your project and videos!

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

      @@DustinBiser Thanks!