Download

Help wth random unit

Hi all…
http://s14.postimg.org/6wneqtga5/Immagine.jpg
I have this…why my ai don’t move? It should go in a random point, right?

Setting the radius to 0.0 could be a problem :slight_smile: What is your origin vector?

i simply want that this ai can walk randomly for the map xD…i do this in the 4.8(without the unit vector)and it works…now with the 4.9 i have to add the origin and doesn’t work

Another point which just came into my mind is, that you may forgot to place a NavMeshBoundsVolume. You can press ‘p’ to show the area that the NavMesh covers.

For now just make sure you have a NavMeshBoundsVolume, set the origin to the middle of your map and make the radius big enough to cover the whole map. After that change EventTick to BeginPlay. Just to test it once.

i ve placed the navMeshBoundsVolume
http://s17.postimg.org/ugb9ychmz/Immagine.jpg
Now it walks…but it walks every time in the same direction and when it collides with another object stop to move istead to go in another point

I guess that your origin vector is not inside your navMesh.

I think you are using a vector which looks like this (1,1,1). Together with a radius of 0.0 your random point is always on (1,1,1).

i don’t understand xD what i have to do? xD
Sorry man but i don’t understand much about this vector of distance xD

No problem :wink:

The problem is that you are using a unit vector as origin. A unit vector has always values between -1 and 1, and is mostly used for directions and so on.

What you want to have is a vector which indicates a position on your map (e.g. the middle of your map). The radius says how much the random vector is allowed to differ from the origin position.

Maybe you should watch some of Tesla Dev’s tutorials. They are really helpful.