Navmesh / AI not working

Hi folks,

I’ve been using the recent OUYA build (forked version of 4.6) using

https://devs.ouya.tv/developers/docs/unreal

My AI works fine in editor, mobile preview & standalone game settings but if I deploy to the OUYA / my Nexus 5 it just sits there in idle animation and does not chase me.

I’ve put some print strings into my blueprint so it appears the logic is OK. Here’s an example of the Simple AI I’m using.

The attack section works, if I spawn the AI close enough it plays the attack animation, it just never starts the AI Move To, I’ve also tried Simple Move. Both work in editor but not on the console / phone.

Is there anything I need to do in particular to get navmeshes to work on Mobile platforms?

Cheers for any ideas / help

Greg

Hi again,

Apologies for the double post, I have just tried deploying my project files (no changes to blueprint) using 4.7.1 on a Nexus 5 and the AI / Nav Meshing is working. I suspect that the build for the Ouya has a bug or more likely I could be doing something daft.

Cheers

Greg

Just give me a heads up when 4.7.X official ships and I’ll branch OUYA from the official release.

That’s awesome :slight_smile: 4.7 is out offical right now. I looked at the github loads of changes.

Cheers

Greg

Hi Greg,

I merged the OUYA Plugin into 4.7.1 and it’s ready for testing.
https://github.com/tgraupmann/UnrealEngine/tree/4.7-OUYA

And if you want to see the changes.
https://github.com/EpicGames/UnrealEngine/compare/4.7...tgraupmann:4.7-OUYA

Try out the nav mesh and let me know how it goes?

Thanks,

~Tim Graupmann

Your a legend Tim, I’ve set it up on my laptop will test it out asap :slight_smile:

Cheers

Greg

Hi Tim,

Sadly no joy I’ve uploaded two APK’s incase you wanted to see it on the Ouya, I could also share the project files if that would help?

Epic’s build with no Ouya support AI WORKS

https://drive.google.com/file/d/0B4o9SD56_m3IU0M5RGI4bGQ1UnM/view?usp=sharing

Ouya build

https://drive.google.com/file/d/0B4o9SD56_m3IRnJZSEFHRUtRWFE/view?usp=sharing

Stuff I’ve tried

a) Copying DefaultEngine.ini from the project that works to the Ouya build no difference.

b) Compared difference Version difference,

Ouya UE4 = 4.7.1-0+++depot+UE4-Releases+4.7
Working UE4 = 4.7.1-2462028+++depot+UE4-Releases+4.7

c) I’ve logged the blueprint with prints on the Ouya version just to check it goes through the nodes (gets stuck on AI MOVE to).

d) To ensure it’s not something to do AI MOVE to I went and set up a really simple behaviour tree using this article (works fine on windows)

e) Another issue, the games stopped appearing on the play menu, I think the lines there in the manifest for it.

Knowing me it’s got to be a tick box, but as the issue seems to have gone from 4.6 → 4.7.1 in the Ouya branch I have no idea where or what it is :confused:

Sorry it’s not better news. I’ll keep thinking but any ideas?

All the best

Greg

Yeah after 4.6 there’s a new settings menu that generates the AndroidManifest.xml. This manifest lacks the ability to add intent filters to get your game to show in the play section. I’ve created a request to allow adding intent filters.
https://answers.unrealengine.com/questions/180697/androidmanifestxml-ue-471.html

You can get around this using APKTool and manually edit the built APK to add the intent filter and then repackage the APK, and sign it.

The OUYA plugin is going to add controller input etc.

If the AI is not working on a fresh checkout of just 4.7.1 (Without OUYA) it’s not going to work on the OUYA branch either.

Is this an Android problem or an OUYA problem?

Hi Tim,

Ah cool, thanks for that :slight_smile: didn’t know about the APKTool

Epic’s normal 4.7.1 release works on the Ouya with AI. I uploaded both apk’s just to show the difference sorry my bad previous explanation. So something fishy is happening with the Ouya 4.7.1 branch.

Cheers

Greg

Okay so when you say AI / Move is it waiting for controller input (movement)?

I would think I could have potentially broke something in 3 potentially areas.

  1. The Java GameActivity - https://github.com/tgraupmann/UnrealEngine/blob/4.7-OUYA/Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java

  2. Something in the Android launcher - https://github.com/tgraupmann/UnrealEngine/blob/4.7-OUYA/Engine/Source/Runtime/Launch/Private/Android/LaunchAndroid.cpp

  3. Or something in the Android JNI layer - https://github.com/tgraupmann/UnrealEngine/blob/4.7-OUYA/Engine/Source/Runtime/Launch/Private/Android/AndroidJNI.cpp

Or the AI is really waiting for an input signal from the controller???

I would also look at your logcat, maybe an error is being logged?

Hi Tim,

I don’t know what it’s waiting for, the only time I’ve seen AI not move on a PC build is if a navmesh isn’t there, however when I do print string checks I can see it on the Ouya.

What’s happening at the moment is the AI is able to make a decision on how far away the player is and then it calls AIMoveTo

AIMoveTo executes but it never returns a success or fail. So pretty much the game refuses to move the enemy.

I tried behaviour trees which is an alternate approach. This yields the same result, UE4 can do the calculations but fails to move the enemy.

I haven’t tried logcat yet, will have a go I’ve installing the apk’s wirelessly :).

Cheers

Greg

Hi Tim,

After going through Logcat this is the only major difference I could see is that the Ouya plugin version of UE4 didn’t register an AISystem creation for the map, I uploaded the log to pastebin, the top lines are from the Ouya version and the bottom bit is from the regular version.

Dunno if that is whats causing it though :confused:

All the best

Greg

The top log has an extra log message…

[2015.03.02-23.45.57:837][ 0]LogBlueprintUserMessages: going to move

@Greg feel free to ping me on Skype: tgraupmann_prey

I believe I’ve fixed this.

I compiled in Visual Studio for “development” for Windows 64 and Android.

I then repackaged the game and deployed on the Ouya.

Crappy footage hehe - YouTube

I don’t know why doing the extra compiles work, I’m no programmer. I was originally compiling only the “development editor” for windows 64 and the “development client” for Android and with those settings the AI does not path.

Cheers

Greg

No luck for me. I did a fresh checkout of 4.7 from Epic and the AI wasn’t enabled.

I’m wondering which branch is 4.7.1 checked in? Does that go on the 4.7, or the release branch, or something else?