I have followed every single tutorial I can find on how to move a simple ai object to a random point.
I have tried multiple different methods of input and the only thing that works is what I have here:
The actor will only follow the ground Z axis instead of moving to a point up or down. If I put the actor in the air it will move down until it hits the ground despite setting actor gravity to 0.
I’m open to suggestions for alternative methods. I want the object to move in any direction within a specified area.
By actor, I think you mean pawn, because you can’t have AI on an actor and you’re probably not using a character since you mentioned you couldn’t replicate the result of the tutorials you followed (which is most likely because they included the use of the character movement component)
So here’s how you can move a pawn to a random location:
Thanks for the reply. I’ll try that. I started with a pawn and then ended up using a character when it wouldn’t rotate to face the direction of movement.
I checked these boxes and it sort of fixed that problem.
Would you have a solution for this that works with a pawn?
Thanks a bunch!
I got it to work but I have no clue how to set up a loop option within the blueprint. I just want a basic continuous loop that moves the object to the new position within a set location boundary.
I’m having a hard time figuring out how to make my model glide along smoothly to the new location.
Also the new location seems to ignore the nav mesh altogether and sends the object through the ground and walls. (yes I have collision applied to the base mesh of the object)
I know I left this detail out, but I’m trying to move a fish through water in a realistic manner. The AI sort of worked because it automatically looped and gave basic collision detection and path tracing inside a set area.
I managed to get it to loop by simply putting a delay and having it loop back to the beginning. It still doesn’t work to move to a Z location off the ground for some reason and I can’t get it to rotate in the direction it’s moving.