Getting an actor to move to another actor/object?

I am creating a set of experimental trials that basically entail a ‘prey target’ randomly appearing within a space, to which the player can then search and ‘capture’ the prey. The level then resets with the prey target in a new random position. I wish to make the prey undergo some movement in some of the trials (just straight line stuff) but the process of getting it to move randomly within the space (but not leave the space) seems to be difficult. My solution was to create another object/actor (named ‘Magnet’) which also randomly spawns and to which, each trial, the prey can then flock to…

I’ve tried ‘Move to Actor’ and ‘Simple Move to Actor’, neither of which seemed to work (although I’m a relative newbie) - any suggestions/help?? The Magnet is an actor currently, but can be changed if necessary!

(Screenshot for previous attempt)

Cheers!

Hi BladeMaster,

Cheers for the fast reply. Neither seemed to work. I’ve also tried Timeline and Lerp combo, but am not getting any movement whatsoever (smooth or otherwise) of my prey actor towards the magnet… Does this suggest an error elsewhere? If so, what’s the likely culprit?

Cheers

Are you using any movement component?

I do not - what’s the basis to the movement component and how would I implement it?

If you just need move one actor to another actor straight line, you can add component ProjectileMovement, and then setting the speed and rotation or setting the velocity, this is the most time I move simple actor, for example:bullet.

If you want to move component, then you can use the blueprint function MoveComponentTo.

Try this video: Unreal Engine Item magnet within range. Video 1/4 - YouTube
MB u could catch a point.

Cheers for the response. I’m still getting absolutely no movement from my spawned Prey though, regardless of method… Projectile movement seems great but my ‘projectile’ in this case would literally be the Prey actor (not separate entities).

Right idea but from the reverse perspective - I want the Prey actor object to be moving towards/attracted to the arbitrary Magnet object. I also have no character - it’s all mouse player controlled.

I’ve now tried with and without a move component of sorts to no avail

Finally got some movement (although needs some major tweaking) using this: WTF Is? Projectile Movement Actor Component in Unreal Engine 4 ( UE4 ) - YouTube

Based upon the finer (albeit basic) parameters for Add Projectile Movement Component (as suggested by feiwu and lotti). I’d obviously set it up in a weird in which gave me no movement whatsoever!