Function with object component input?

Hi!

So I’m trying to create a line tracing function that has two inputs:

1 - The maximum range of the line trace (float)

2 - What object/component (camera, mesh, random object) that should start the line trace

Now in my head, I should be able to set an input (in the function) as “Actor Component”, to be able to plug in what component I want to start the line tracing from, and then take it from there, just so I don’t have to create the same nodes over and over for each line trace I do. Now my problem is that if I create that input, I can’t plug that one into, for example, the “Get World Transform” node (see image), which I normally can in the event graph to get where the line tracing should start from.

So my question is, how do I create a function where I can plug in a component to start the line trace from, and then, it (the function) will do the rest? Bear in mind (which might be obvious) that I’m new to both unreal and functions, so the more detailed answer the better :slight_smile:

Thanks in advance!

Actor Components (function input) are different from Scene Components (transform node target). Actor Components do not have transforms. Perhaps it’s enough that you change the function input type to Scene Component.

Oh my, I feel so stupid… I just didn’t see the ‘Scene component’ in the long list when I searched for ‘Component’ in the type list. Anyway that seem to have done the trick!

Thank you for your quick reply!