# When spawning a c++ Actor from blueprint, why is the GetOwner and GetInstigator null?

**URL:** <https://forums.unrealengine.com/t/when-spawning-a-c-actor-from-blueprint-why-is-the-getowner-and-getinstigator-null/362039>\
**Category:** Blueprint\
**Tags:** rotation, UE4-11, unreal-engine, null, Scripting, question\
**Created:** [June 26, 2016, 6:09am UTC](https://forums.unrealengine.com/t/when-spawning-a-c-actor-from-blueprint-why-is-the-getowner-and-getinstigator-null/362039 "2016-06-26T06:09:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_84e009961](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_84e009961](https://forums.unrealengine.com/u/anonymous_user_84e009961)\
**Post date:** [June 26, 2016, 6:09am UTC](https://forums.unrealengine.com/t/when-spawning-a-c-actor-from-blueprint-why-is-the-getowner-and-getinstigator-null/362039/1 "2016-06-26T06:09:55Z")

</div>

I have recently began the journey of learning the c++ ways, and am converting my various knowledge of blueprints into c++.

My current ‘Non Homing Projectile’ is simple. It is meant to be a spawn and travel in the direction that the controller is facing in. Currently in Blueprint, I can simply grab the owner, cast to pawn, and then set the current actor rotation based on getting the controller of the owner: [http://puu.sh/pGkrD/079d5b6257.png](http://puu.sh/pGkrD/079d5b6257.png)

I attempted to add the code in c++ to replace the current Blueprint version of this functionality, but the GetOwner and GetInstigator functions both return null as far as I can tell as the only message that prints off is 'My Rotation is Null =(": [http://puu.sh/pGkAB/771e01f07b.png](http://puu.sh/pGkAB/771e01f07b.png)

How I am spawning the projectile: [http://puu.sh/pGkCF/efb857b1c5.png](http://puu.sh/pGkCF/efb857b1c5.png)

Summary: My Blueprint variation of setting the ActorRotation based on the Owner works, but the c++ version does not know of an owner. So is this a product of spawning an actor in blueprints? Or is this a case of c++ constructors firing earlier than I am expecting (this works when I move the code to BeginPlay in c++ of course, but projectile movement being set on construction is what I want). Any help or tips would be appreciated!

---

<div class="post-metadata">

**Author:** ![Sneirox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sneirox](https://forums.unrealengine.com/u/Sneirox)\
**Post date:** [February 14, 2018, 4:55pm UTC](https://forums.unrealengine.com/t/when-spawning-a-c-actor-from-blueprint-why-is-the-getowner-and-getinstigator-null/362039/2 "2018-02-14T16:55:41Z")

</div>

Same problem on 4.18
