x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to dynamically place nav link proxies?

I am trying to use nav link proxies and I search for a way to place them without manually placing them in the level. So I want to put the nav link proxy in a blueprint and any time I place the blueprint it's configured correctly. If you have many same objects which all need to use nav link proxies this makes sense I guess. And I also want to spawn these blueprints dynamically while the game runs.

But how can I do this? I actually always thought there would be something like a "nav link proxy component", same as there is a "nav modifier component", but I can't find any "nav link proxy component" and I also can't find any other way to spawn one from blueprint. Where is it? I really need it, I just never thought about this being a problem before.

I just noticed I can create an actor based on nav link proxy, so I could add this actor as a child actor component to my blueprint, but then the problem is I can't set the left and right point in the viewport because it's a child actor component and not a nav link proxy. Now I can get the real nav link proxy actor in blueprint from the child actor component, but then the problem is that there is no way to define the left and right point!

After clicking on a nav link proxy in the level I see that there seems to be an array of "PointLink" structs (?) inside where I can set the points, but I can't get and set these struct from a blueprint which inherits from "nav link proxy". Why?

Product Version: UE 4.8
Tags:
more ▼

asked Aug 27 '15 at 11:13 PM in Using UE4

avatar image

John Alcatraz
1.3k 58 139 126

avatar image John Alcatraz Dec 15 '15 at 03:46 PM

No answer? Maybe @MieszkoZ knows something about this?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

I don't think there is a way to do it purely in Blueprint, as the positions of the links (point or smart) are not exposed.

You would have to create a small C++ helper class to do just that.

  1. Create a C++ Class based on the NavLinkComponent. You'll need to tick "Show All Classes". Call it BlueprintableNavLinkComponent.

  2. Open the .h file and find the line with UCLASS(), and add meta = (BlueprintSpawnableComponent) in between the brackets, so it looks like: UCLASS(meta = (BlueprintSpawnableComponent))

  3. Add the following two lines of code under the GENERATED_BODY() line:

    UFUNCTION(BlueprintCallable)

    void SetupLink(FVector Left, FVector Right, ENavLinkDirection::Type Direction);

  4. In the source file (BlueprintableNavLinkComponent.cpp), add the following code:

    void UBlueprintableNavLinkComponent::SetupLink(FVector Left, FVector Right, ENavLinkDirection::Type Direction) { this->Links[0].Left = Left; this->Links[0].Right = Right; this->Links[0].Direction = Direction; }

For more see this blog post: https://www.vikram.codes/blog/ai/02-nav-modifiers-links

more ▼

answered Nov 23 '17 at 09:03 PM

avatar image

Cpt.Trips
107 2 10 20

avatar image vikhik Feb 03 '18 at 04:46 AM

Thanks for the shout-out! Let me know if you have questions @OP!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Same problem! Looking for a way to let AI drop down off high ledges without placing a bazillion proxies. Seems like it should be easy.

more ▼

answered Sep 04 '15 at 06:33 AM

avatar image

JoeWintergreen
326 10 18 28

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I have the same problem too. Any ideas?

more ▼

answered Sep 28 '17 at 04:39 PM

avatar image

YuchenMei
1 3 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question