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"

Create a custom navigation system?

Hi everyone. I would like to update the default navigation system, but I don't know where I would make changes. Ideally, I would like to create a new navigation class that is the child of whatever the default navigation class is and tell my AI controller to use the navigation system I just made. The problems I have with the current navigation system is:

1) my AI freaks out if it has to use a nav link proxy to drop off a ledge to follow the player. It takes several seconds of standing at the ledge before the AI drops off of it and by that time the player the AI was supposed to follow is long gone.

2) I cannot tell my AI to jump onto a waist high raised area to pursue the player. Currently, the AI stands at the edge of the flowerbed with the player looking down on it like obi wan saying "I have the high ground"

I couldn't find a way to handle these problems in blueprints, so I'll use C++. I have never used C++ before, but I have used java quite a bit and am going through some tutorials on C++, so I think I can figure things out as I go along once I get started.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 25 '18 at 12:58 AM in C++ Programming

avatar image

sounderdisc
29 6 10 14

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

1) Create your new class in the header file like this:

 #pragma once
 
 #include "AI/Navigation/NavigationSystem.h"
 #include "MyNavigationSystem.generated.h"
 
 UCLASS(Within=World, config=Engine, defaultconfig)
 class MYPROJECT_API UMyNavigationSystem : public UNavigationSystem
 {
     GENERATED_UCLASS_BODY()
 };

2) Add this to the cpp:

 #include "MyNavigationSystem.h"
 
 UMyNavigationSystem::UMyNavigationSystem(const FObjectInitializer& ObjectInitializer)
     : Super(ObjectInitializer)
 {}    

3) Add your new class to the DefaultEngine.ini, in the Script/Engine.Engine section:

 [/Script/Engine.Engine]
 NavigationSystemClassName=/Script/MyProject.MyNavigationSystem


more ▼

answered Jan 18 '19 at 03:38 PM

avatar image

TooManyCrashes
156 5 12 19

avatar image sounderdisc Jan 30 '19 at 01:01 AM

Thank you for answering such an old question. I haven't touched my project in quite a while since I put a bit of a bow on it and called it "complete for now." I'll give this a try the next chance I get.

(comments are locked)
10|2000 characters needed characters left
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