Obtain reference of a TargetPoint in a Blueprint

I am trying to get a reference of a TargetPoint in a Blueprint other than the level blueprint, but no luck so far. Any suggestions?

I am trying to use it to teleport the player to another location. Thanks in advance!

Well, besides the usual line tracing, there are a few ways. I recommend that you cast to your blueprint and set a reference to the TargetPoint from your level blueprint, but you could also use the ‘get all actors of class’ node, though I don’t recommend it, as the ordering of actors is different in a packaged game than in editor.


I tried to do it, but I cant seem to get it (Right Target is the target point), I havent connected to the other nodes as theyre too many to show in one image.

Ok, you said you wanted to obtain a reference of target point in a blueprint, so cast to the blueprint that you want the reference to be in (if you want to reference targetpoint from your character, cast to your character). If you wanted to reference the target in your character, make a new variable in your character that will store the reference, and then from your level blueprint, cast to your character, and set the variable to the target reference.

So I have created a object reference in my Door BP called TargetVar, but when I compile this it gives me an error :confused:


If your door is not a Target Var, then you can’t cast to it. You’ll need to find some way to reference your door for the cast. I don’t have time to go into the details of getting a reference for your door, but if you wanted to set the reference in your character, you’d cast using ‘Get Player Character’.

Edit: I suggest you do some reading on casting, it will help clear up some of your questions.

Ok thank you very much for the help!

You could check out my latest project that shows some referencing stuff:

Don’t know if it would actually help here, but maybe you learn some stuff (:

Ok thanks :smiley: