Cannot implement a function that uses LineTrace within another function

Creating a blueprint function library, I made a helper function that utilizes LineTrace

This function cannot be, in turn, used accross other more complex blueprint functions because of the error:

"Error Could not find a pin for the parameter __WorldContext of Grid Height Sample on Grid Height Sample "

I presume a function that uses linetrace must be directly used by an actor?

In the example below, grid height sample implements Linetrace, I am trying to use this for a more complex operation…thoughts?

Hi ,

Have you tried using a cast to node? Typically to access functions from one blueprint in another you have to cast to the blueprint with the function you need.

I know this is an old issue … but commenting in case someone runs into this in future… I’m pretty sure the bug listed here is the same as I just reported here:

https://answers.unrealengine.com/questions/231716/blueprint-compile-error-could-not-find-a-pin-for-t.html

There is a workaround in that bug report that should work for you, but in short you should be able to just put a Get Player Controller node in your Grid Height Sample function. This node wouldn’t be hooked up to anything. By being there it tricks the Blueprint compiler into doing the right thing.