Interaction System - Trace Area - Unreal Engine 5 Tutorial [UE5] #1

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2024
  • Check out my inventory system:
    🌿www.unrealengine.com/marketpl...
    We're going to set up a character component that will trace an interaction area actor.
    True First Person Tutorial: • True First Person - Un...
    Set Up HUD Tutorial: • Round / Radial Progres...
    🔷💬Join my discord server / discord
    00:00 Introduction
    00:54 Interaction Area
    02:35 Trace Component
    14:40 Outro
    #ue5 #unrealengine #niceshadow

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

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

    I'm really new to all this but for anyone else in my position, I'm doing a third person game and drawing the line trace from the camera feels really unnatural so around 7:20 so here's how I set mine up.
    Go into your character skeleton and add a socket where you want the trace to come from, I'm using Manny and did Spine04 as it's pretty central, then in the trace function:
    Trace -> Cast to your character BP -> Line Trace by Channel.
    Get Player Character -> Cast to character BP (Object), (As Character BP) -> Get Actor Rotation (as in video)
    Cast to Character BP (As Character BP) -> Get Mesh -> Get Socket Location (In Socket Name = your socket name from character skeleton), (Return Value) -> Line Trace Start & the add node as in the video
    Hope that makes sense, and helps someone!

  • @Smile........
    @Smile........ 8 วันที่ผ่านมา +2

    Thanks a lot!

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

    I love the way you explain things mate, amazing content

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

    Really nice Tutorial!
    I watched a lot of other Tutorials for Interaction systems and i had huge trouble to implement them on my Character since they are over simplified or not explaining the details not enough if they are more complex. Yours is just brilliant. Longer road but now I understand actually trace function better which is worth so much more.

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

    man you dont even know how helpfull this is awesome tutorial 👍

  • @jonklemenc
    @jonklemenc 6 หลายเดือนก่อน +2

    Awesome!

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

    thank you!

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

    I think it makes way more sense to put an actor component blueprint that simply checks if the player is nearby, and that their camera forward vector is facing toward their world position. You could have it check like 10x per second... Although I'm not sure how performance would be affected with multiple objects making the same check versus the player checking 33x per second. Not sure. This is an interesting setup though!

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

    How do you suggest making this work well with 3rd person?

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

    From your description I'm realizing this is oriented towards multiplayer integration, and on single point of interaction. What if I wanted to be able to set up a interaction "radius", in which you want to interact with something to your side or even behind you?

    • @Dennis-np2dn
      @Dennis-np2dn 2 หลายเดือนก่อน

      You would work with objects that you're overlapping with instead of a linetrace. What you could do is create an interface, assign that interface to the interactable objects and then in the player bp use the nodes "get overlapping actors" and after "does implement interface". Hope that helps :)

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

    Hi, thanks for the great tutorial. Unfortunaly I am facing the same problem as Mr.Smidge. I already have a "EventBeginPlay"-Node in my ThirdPersonCharacter blueprint so I can't creat a new one. And I can't connect the "SetupIntractionTrace"-Function with the already existing one without breaking its connection to the movement system of the blueprint. So I created a "CustomEvent"-node like Mr.Smidge did. But nothing happend. I followed your tutorial up to the point where you check the line trace. So in my opinion I should see the red line of the line trace when playing. Do you have any ideas why? Best regards

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

      Hi, only creating a custom event does not execute the event. But you don't need the custom event. That you cannot connect the SetupIntractionTrace function to the existing EventBeginPlay (because of the movement system) is not true. You can connect it after the AddMappingContext node. Or as an alternative you can connect the EventBeginPlay directly with a Sequence node. The first pin of the Sequence could trigger the movement system stuff and the second Sequence pin can trigger the SetupInteractionTrace function.

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

      @@NiceShadow Hi NiceShadow, I really appreciate your fast and detailed answer. It works great, even in third person. I just extendet the "length"- float variable in the AC-InteractionTrace up to 1000 and everything is fine. Thanks for your respond and many thanks for your tutorials.

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

      Thank you for the added context. I was wondering why this wasn't working in third person but adding the SetupIntractionTrace after the AddMappingContext node worked for me. solid work. @@NiceShadow

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

    how do you create 2 event begin play because the default bp thirdperson character already has a event begin play and wont let me make a new one and if i use the one that is already on there it makes it were i cant move

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

      You don't need 2 event begin plays. You can create a custom event instead and let the EventBeginPlay additionally execute this custom event

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

    is linetrace based interaction more performance saving than those using collision?

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

      sometimes, you want to interact with an item you are looking at.. imagine if you are colliding with several objects at the same time, how would you sort which one to interact with? the closest one? take a look at resident evil 2 remake system, it uses the collision to highlight which items you can interact with, and the trace + interact key to actually use that item.

  • @Mr.Smidge
    @Mr.Smidge ปีที่แล้ว +1

    6:16 i placed down a Custom Event because i already had a EventBeginPlay node and it would just zoom on to that one, that should be a problem right?

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

      That's no problem :)

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

      Had the same question

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

    Hello I wanted to ask which version of Unreal is this? The line trace keeps aiming towards the corner of the third person demo map for some reason in 5.3.2 and I don't know why. Any help would be appreciated!

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

      I don't think that's an unreal version problem. The version used in this tutorial is 5.0

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

    what about line traces when you have two perspectives? fps and tps??

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

      as the trace show in the video starts at the general camera location it works for both, first and third person. But for third person your probably need to increase the trace length a bit

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

      @@NiceShadow i figured it out but thanks anyway man.. appreciate it

  • @user-yk9jh2mn8f
    @user-yk9jh2mn8f ปีที่แล้ว

    When i start the simulation my lines dont follow my camera but are drawn from my character to a fixed point on the map

    • @Bukin-xz6sr
      @Bukin-xz6sr 6 หลายเดือนก่อน

      You need to check, maybe you just didn't add the add note with your forward vector after multiplying and your actor location

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

    Your videos are very good, but you could improve by removing the silences.

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

      Thanks, which silences? or do you mean removing background noise?

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

      @@NiceShadow Periods where you don't say anything or like so.... amm....

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

      @@estagiarioyt That could be good for some people to get it more compact but for others it would feel too rushed though everything. And personally I think it would destroy the flow a bit becuase if I would do it strictly there would be many cuts (would also be more cutting work ^^). So I think I should rather use the time to create new tutorials and get better/more experienced in explaing and I am sure than I can also reduce the "amm"s

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

      @@NiceShadow I had no problem with how you spoke and you explained everything well and clear. This comment is just nitpicking to be honest, on information given away for free nonetheless. We want to follow along and sometimes need the time to process what has been done in our own project anyway. Appreciate the video and will def check out more. Thanks.

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

      I need the silences so I can keep up! :D

  • @user-gn8gr2qm4o
    @user-gn8gr2qm4o 3 หลายเดือนก่อน

    Your videos put me to sleep.