UE5 LyraStarterGame Prototype Interaction System
HTML-код
- Опубликовано: 6 фев 2025
- Demonstration of the Lyra Interaction System, including a loading bug workaround, conceptual overview & code review . This system is marked by Epic as a "prototype" as of UE 5.0.3. It is mainly intended as an example of how you might build your own interaction system.
00:26 Prototype Demo with Enhanced Visualization
02:01 How to Fix Stock Lyra Inventory Map
03:31 Key Concepts
04:57 GA_Interact: Scan for Interactables
06:09 GA_Interact: Blueprint
08:21 Interactable Object (a Rock)
09:24 GA_Interaction_Collect: Collect an Item
Documentation available on my blog:
x157.github.io...
LyraStarterGame assets opened in this video:
ShooterMaps/PROTO/InventoryTest/L_InventoryTestMap
ShooterMaps/PROTO/InventoryTest/LAS_InventoryTest
ShooterMaps/PROTO/InventoryTest/Input/Abilities/AbilitySet_InventoryTest
ShooterMaps/PROTO/InventoryTest/Input/Actions/InputData_InventoryTest
ShooterMaps/PROTO/InventoryTest/Input/Mappings/IMC_InventoryTest
In Lyra 5.2, this has been implemented in ShooterExplorer. The interaction system works out of the box now
The 5.2 system is virtually identical to previous versions. You're right, they did fix it so it loads easily now in the new ShooterExplorer plugin.
Wonderful video man, thanks for the clinic ;)
does anyone know how to add this to the game, because i'm not being able to use it outside the L_InventoryTestMap
I'm having the exact same issue. Works perfectly in L_InventoryTestMap, on my map the Line trace it uses doest hit anything.
For anyone having issues adding this inventory system to a game mode with bots: I added a check at the start of GA_Interact which uses Get Controller from actor info>is local player controller>then a branch with true>then it turns on the scanning on spawn for players only and not bots. (Bots getting this makes the engine crash.)
I believe Lyra does it by adding the associated AbilitySet only to APlayerController on the client, which has a similar effect. But yes, it's true that bots in Lyra do not need this ability and will not use it even if they have it.
Xist, Very satisfying video 🤩
Thanks! :D
This video is very helpful to game designer! THX a lot!
Glad it was helpful!
@@XistGG if u don't mind, I would like to ask a question: can GA_Interact return line trace hit point? I am trying to make a rope slide like Apex Legend, I want player attach to the point where line trace hit the rope, but I don't know how to get that info.
@@twcloud the line trace is being done in C++. You can absolutely grab it and use its result. Look at the base C++ source to find it and expose it.
@@XistGG Woooooo! THX! well, I don't understand C++, I just can do some blueprint, but I can ask our programmer for help! by the way, is there any easy understanding C++ course in UE game development for game designer?
I have some notes here: x157.github.io/UE5/Dev/
Also Tom Looman has a UE4 C++ course that is a class he taught at Stanford recently. It is an excellent intro to UE4 C++ if you don't mind spending the money on it. The differences between it and UE5 from a C++ perspective are relatively minimal.
Just curious, it doesn't seem like the interact ability from the GrantNearbyInteraction task ever gets removed. Is that feature just missing or is it intended to be like that?
Really great info, thanks!
My pleasure!
is there some secret sauce to getting this thing added to the ability set? Lyra 5.1
You are a god
Glad to be able to help!
Can the Interaction system system support multiple interactions per object? For example, a door can be interacted in two ways, by open/close or Lock/unlock.
You can upgrade it to support multiple interactions. I did so in my custom Lyra. By default it does not support multiple interactions without modifying C++ though.
Thank you very much for your clear walkthrough of Lyra Framework. For interaction system, example B_InteractableRock is a child of LyraWorldCollectable, with interaciton ability GA_Interaction_Collect that adds pickup to inventory component. What if I want to add interactables like door or elevator? How can I do it under Lyra's framework?
Look at the C++ code for LyraWorldCollectable. You can make other classes similar to that with whatever changes you want for a Door, Elevator, whatever.
@@XistGG And if I don't know C++, can't I use Lyra?
@@максим1223-ы7ю It's possible to use Lyra without knowing C++, but you will be more limited to what you can do. Some people are using it without any C++ at all (or with very little).
Remade something similar, is Lyra Interaction system works in multiplayer?
Yes, everything in Lyra fully supports multiplayer. 👍
Thanks for the tutorial it helped to understand what the heck is going on in terms of picking up items off the floor. But I am still confused how to use this system to press a button and open a door for instance. My old method was to have the door referenced on the button it self in the level and use a interface to send a message to the door to open or close it self. But I can't see how to do that with this method. Any idea would be helpful. Cheers!
In your example, the button would be the interactable object. When you interact with it, it opens the door via a reference, same as before. The Lyra system is the way the player initiates that interaction on the interactable object. What that object is, and what it does when interacted with, is totally up to you.
Very informative tutorial, thank you! Could you do a lyra camera system tutorial? The default one has penetration avoidance, but doesn't have spring arm feature so it's popping when character walking on stairs. I didn't figure out how to change the camera system to work. Thanks in advance!
If/when I eventually customize the camera, I'll keep it in mind! I'm still super deep into Interactions atm though so it won't be very soon FYI.
Hi! I need help. I made "SpawnActorFromClass" in my BP Actor and trying spawn B_Hero_Shooter_Mannequin. I wanna create zombies system. I already made WaveSystem, but i can't integration that with Lyra. Please tell me, what is function i need to call so spawn new character whose will be support ability system? Thx
Check the ALyraCharacterWithAbilities class. Lyra doesn't use it in their demo because the bots are essentially treated like players. But if you want things in the game that are not players or simulated players, then you need to use something like that class.
@@XistGG do you mean change parent of my class to ALyraCharacterWithAbilities and spawn them? I spawned B_Hero_Shooter_Mannequin's child class. Ok, thank you, i will try that.
@@unrealprogrammer7853 the B_Hero_Shooter_Mannequin *might* work, it really depends how you implement your bots. However if you spawn an ALyraCharacterWithAbilities (or something similar) then it can participate in GAS and you can customize it to be whatever kind of character you want.
@@XistGG thx very much. Right now it can get a damage. I wanna know how to attach b_manny for him
@@unrealprogrammer7853 for this use case, I created a BP off of ALyraCharacterWithAbilities. Then I looked at how Lyra implemented B_Hero_ShooterMannequin. (It's based on B_Hero_Default, which is based on Character_Default). You need to study each of those classes to see what it does, and some parts you'll want to copy to your own blueprint, and ignore the parts you don't want. You probably want a little from each. Good luck! :)