#Lesson 122: Projectile Impact (Ignoring The Instigator?)

1 messages · Page 1 of 1 (latest)

hexed yoke
#

Going through Projectile Impact I realized that my radius sphere being too big causes it to explode on impact and hit my player character immediately.

This seems very unideal and something that should be pretty easy to fix.
Its late at night so I'm a little too tired to dig deep - but I am guessing the best method would be inside the projectile to have it set the owner / instigator of the skill and then have it compare to other actor.

If(OtherActor == Instigator) return;

For example would be the solution that you'd run in overlap to avoid destroying the object early.
However, I'm not sure - probably because of the time. How to go about getting the instigator and where to set it.

My best guess would be on create / begin play for the projectile.
So create a private Uproperty ProjectileInstigator.
In begin play
ProjectileInstigator = GetInstigator();
Is there a better way to do this? Not sure it'll work will try in the morning but if anyone has any insights appreciated

hexed yoke
#

So been working on this. I think I need to rewatch a few prior lectures. We're able to get mouse cursor location so perhaps I can do something with storing the instigator there and bringing it up in the projectile.

In the meantime I found a workaround for using sphere->IgnoreActorWhenMoving(GetPlayerCharacter(Index 0),true)

Not exactly great or right, but its got me thinking in the right direction I think

hexed yoke
#

So I've found in blueprints GetAvatarFromActorInfo -> Get Instigator and can get the owner from there. I just need to figure out the best way to get this into projectile to ignore it. Unless there is a better way