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"

How to make basic AI in a 2D side-scroller?

I am making a 2D side-scroller as a small project. I can make every thing work except for AI. What I want to do is make a basic AI that will follow the player character from going side-to-side AND DAMAGE HIM ON CONTACT. I also want the AI TO TAKE DAMAGE FROM PROJECTILES SHOOT FROM THE PLAYER AND DIE. I have tried using the mesh bounds volume, but for some reason the areas are not being highlighted and the AI will not move around. Any information would be helpful.

Product Version: UE 4.8
more ▼

asked Jun 30 '15 at 07:04 PM in Using UE4

avatar image

1 1 1 1

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

2 answers: sort voted first

Here's how i used nav mesh in my paper 2d project. Set the tilemap or floor sprites to collision thickness of 500. I'm using tilemaps for creating my levels. So my tilemap is set to 0 on the Y coordinate. Placed a nav mesh volume at y=-50, resized to x-length of the floor, y=100, z=10 (height). Placed the nav mesh volume where the floor is. If you press P in the editor, it should calc the navigation, and show a line in green. There is a few issues with using tilemaps though, which i'm trying to fix. If you have 2 walking floors, 1 above another, the shorter length floor's nav is used for both floors, even if I placed each floor it's own nav mesh volume. Also, if nav mesh calc is set to Dynamic, the AI is not moving until I interact with it, so best to use Dynamic with Modifiers.

Hope this helps you.

more ▼

answered Aug 10 '15 at 04:20 PM

avatar image

11 1 4

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

nav mesh bounds volumes only work in 3d space, that means on shapes with a 2 dimensional top side. The problem at paper 2d sprites is that the top is 1 D, so its just an edge and not a face. So you cant use Nav meshes--> no AI move to I solved the problem by just mking very simple monsters in BP. hope I could help

more ▼

answered Jul 11 '15 at 03:26 PM

avatar image

1 1 3

(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