# How to make a homing projectile

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620>\
**Category:** World Creation\
**Tags:** homing, unreal-engine, projectile, question, Blueprint\
**Created:** [December 19, 2017, 7:31am UTC](https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620 "2017-12-19T07:31:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grey27](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grey27](https://forums.unrealengine.com/u/Grey27)\
**Post date:** [December 19, 2017, 7:31am UTC](https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620/1 "2017-12-19T07:31:48Z")

</div>

Hello, I have a projectile that I spawn from an AI, and I want it to home in randomly, on one of three cubes in the game.  
My issue isn’t really making it random but getting it to have those cubes as its target automatically when the game begins. Any help?

 ![224362-2017-12-19-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/7/4478f25b439fb8ed9fb4596b311085f6706e66ed.jpeg)

---

<div class="post-metadata">

**Author:** ![Ego\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ego\_Studio](https://forums.unrealengine.com/u/Ego_Studio)\
**Post date:** [December 19, 2017, 7:53am UTC](https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620/2 "2017-12-19T07:53:15Z")

</div>

You have to create an Actor (ex. Cube). Put instances of the Actor on the scene. GetAllActorsOfClass (Cube) and drag a Get, as Index drag off Random Interger In Range (Cube count -1 as max) then you can have a reference of the Cube Actor to be the target of the homing projectile.

---

<div class="post-metadata">

**Author:** ![Grey27](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grey27](https://forums.unrealengine.com/u/Grey27)\
**Post date:** [December 19, 2017, 8:20am UTC](https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620/3 "2017-12-19T08:20:25Z")

</div>

Could I get a shot of what the homing blueprint will look like, I can pretty much do the random bit if I get that.

---

<div class="post-metadata">

**Author:** ![Ego\_Studio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ego\_Studio](https://forums.unrealengine.com/u/Ego_Studio)\
**Post date:** [December 19, 2017, 8:27am UTC](https://forums.unrealengine.com/t/how-to-make-a-homing-projectile/412620/4 "2017-12-19T08:27:25Z")

</div>

Homing missile tutorial : [[Unreal Engine 4.7] Homing Missile Blueprint Tutorial - YouTube](https://www.youtube.com/watch?v=TCkFqSOdw6M)
