Announcement

Collapse
No announcement yet.

(HELP) How to select a Component Collision inside a Blueprint from an Interface?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    (HELP) How to select a Component Collision inside a Blueprint from an Interface?

    Hi al!

    I need help with selecting different components inside my Actor Blueprint(Door BP) in order to have more individual control over each movement animation animation.

    I made a basic interaction system inside a Blueprint. I have created a basic line Trace Chanel interaction system that shoots a line trace trace from the camera(FPS). That then is connected to an Interaction Interface (On Interact)
    Click image for larger version

Name:	Door_03.png
Views:	184
Size:	213.8 KB
ID:	1721992
    In this Door Blueprint I have 2 main Static Mesh Components, a Door Handle and the Door. Each with their own collision and animation

    Click image for larger version

Name:	Door_05.png
Views:	96
Size:	172.0 KB
ID:	1721994
    My question is, how can i select/break out each component(Door Handle and Door) inside the Door Blueprint and connect them to the Event on Interact node and then to their respective animation?
    As of now for some reason Unreal registers the two different mesh components with the same collision, and I would like somehow to differentiate between the two collisions. As i want the line trace to play a different animation depending if it hits the Door or the Handle.

    Any ideas on how to solve this? Thanks a lot!
    Attached Files

    #2
    Originally posted by Wolfchamp View Post
    Hi al!

    I need help with selecting different components inside my Actor Blueprint(Door BP) in order to have more individual control over each movement animation animation.

    I made a basic interaction system inside a Blueprint. I have created a basic line Trace Chanel interaction system that shoots a line trace trace from the camera(FPS). That then is connected to an Interaction Interface (On Interact)
    Click image for larger version

Name:	Door_03.png
Views:	184
Size:	213.8 KB
ID:	1721992
    In this Door Blueprint I have 2 main Static Mesh Components, a Door Handle and the Door. Each with their own collision and animation

    Click image for larger version

Name:	Door_05.png
Views:	96
Size:	172.0 KB
ID:	1721994
    My question is, how can i select/break out each component(Door Handle and Door) inside the Door Blueprint and connect them to the Event on Interact node and then to their respective animation?
    As of now for some reason Unreal registers the two different mesh components with the same collision, and I would like somehow to differentiate between the two collisions. As i want the line trace to play a different animation depending if it hits the Door or the Handle.

    Any ideas on how to solve this? Thanks a lot!
    Hi, you have to pass the component name into the door BP on interaction. ( Interfaces can have params ).

    Comment


      #3
      Originally posted by ClockworkOcean View Post

      Hi, you have to pass the component name into the door BP on interaction. ( Interfaces can have params ).
      Hi I'm a beginner to unreal, would you mind if you could show or link me how one would do that? Thanks

      Comment


        #4
        Originally posted by Wolfchamp View Post

        Hi I'm a beginner to unreal, would you mind if you could show or link me how one would do that? Thanks
        Hi, so you almost have everything you need now. Like I say, just add a parameter to the BP interface message. It works like this, here the 'back end' of my line trace macro:

        Click image for larger version  Name:	linetrace.PNG Views:	0 Size:	118.9 KB ID:	1722430

        Also, inside the first person character, I have on tick:

        Click image for larger version  Name:	tick.PNG Views:	0 Size:	172.1 KB ID:	1722431

        There's the line trace macro at the start, it just makes it easier to see what's going on. Notice I have two BP interface calls. One is bottom left, the actual click, and the other, a mouse over thing, top right. They are both just messages to the blueprint I am currently interacting with.

        In the blueprint interface definition, I have this:

        Click image for larger version  Name:	BP-interface.PNG Views:	0 Size:	46.3 KB ID:	1722432

        Normally, there's nothing here apart from the name of the interface. But you can also have parameters, like I have done. Finally, here's the even happening inside a target BP:

        Click image for larger version  Name:	isclicked.PNG Views:	0 Size:	11.1 KB ID:	1722433

        I just called my BP interface message 'is clicked', hence this.

        Do you get it now?

        ( notice, the whole point of this is I'm also passing the clicked component name through the whole process ).

        Comment

        Working...
        X