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"

UE4 Make an Actor move to a random location

I need to have an actor (Its a 2D game) pick a random spot and move to it. It can only move left to right and up and down because youre looking at a flat plane. The actor is supposed to be flying as well (So it can move up and down)

Product Version: Not Selected
Tags:
more ▼

asked Mar 07 '19 at 11:33 PM in Using UE4

avatar image

ItsLightsaber09
15 2 3 5

avatar image ThompsonN13 Mar 08 '19 at 12:09 AM

ok so whats the question here? do you not know how to get the location or how to move the character?

the location bit is easy you just need to get a random point in range. theres several ways to do this, you could use the random point in nav radius or use a few random interger nodes.

if your querstion is about movement well thats another story. if it was 3d then id suggest a simple move to or a ai move to, coupled with a nav mesh bounds volume.

of course this is very basic ideas. the general idea here is to get a location then zero the axis your not using.

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

1 answer: sort voted first

I figurred it out, I used a set actor relative location and moved it .1 in whatever direction under a tick, so its nit random but it works. Its also 2d

more ▼

answered Apr 14 '19 at 07:35 PM

avatar image

ItsLightsaber09
15 2 3 5

(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