How can I pull of a cockpit missile locking system like this

Basically I am looking for a way to create a classic missile lock on a target that enters a Hud reticle for a period of time.
and a also like elite and dangerous gimbled guns that will auto lock on a ship that’s inside the HUD reticle .and lose lock once it leaves it
but I dont really know where to start :frowning:

example of what I mean

Anyone?
I personally think It may be something along the lines of having a UMG box detecting when it overlaps with a world actor.
but thats just a guess.

  • have a collision cone on the nose or trace ahead of you
  • detect what you’re interested in
  • translate object’s world position into screen position
  • keep a time counter running while the trace returns True; add beep, beep, beep here
  • once enough time has elapsed, do a beeeeeep, show an additional reticle to indicate a lock
  • rinse and repeat if the trace is broken

Thanks Everyone
between what I just learned here: https://www.reddit.com/r/unrealengine/comments/4c9wwo/how_would_you_go_about_make_a_stinger_missile/

and what you just said I think I understand how I could do this.

The first answer is pretty much what I said minus the widget bit. But that’s the gist, yeah.

Rather than using Projectile Movement Component (which can be finicky at times) you can use the Ease node’s functions to close up the gap between the missile and the target.
I helped someone do something somewhat similar (it’s homing in) this morning:

https://answers.unrealengine.com/que…character.html

You’d just have to use a different Ease function for acceleration. It all depends on how realistic this is supposed to be. The included video seems a bit arcady - so this might suffice.
If you need something more advanced, you will need to formulate your own homing algorithm. [HR][/HR]
edit: one thing I did some time ago while tinkering with a homing solution (sci-fi drones chasing spacey things), was to *dynamically *adjust the *Blend Exponent *on the Ease node based on the distance to the target, time elapsed while trying to reach it, number of attempts and proximity to the target.

It made it easier to create feasible, semi-adaptive and player friendly scenarios where the tracking system was able to relax a bit and overshoot, giving the player a fighting chance to dodge. Each consecutive successful dodge would tighten the settings a bit, making you feel like a Top Gun on the first try and a hunted animal after a few dodges. Seemed like a good ratio of player skill vs player gear.

tl;dr: it takes lots of trial and error (mostly error) to make something half decent that’s not overengineered

Good luck!