Hi all,
Just wondering if anyone could point me in the right direction.
I am making a top down shooter (with 3D objects for art style).
I have a player, an enemy turret prefab, a bullet prefab and a loot item prefab. When the player gets shot with the bullet its HP reduces and it drops a loot item.
This all works well enough except that the item drops right in the middle of the player (Create Object action). This means that the player doesn't lose the loot but instantly picks it up again. I see it flashing quickly during testing. Gameplay would let the player chase the loot after being shot, but not instantly like it is now.
Is there a way to have it be ejected in the opposite direction from the enemy bullet that struck the player? i.e. enemy is shooting from top of the screen down at player - the loot is then ejected up (probably with some slight angle for variation).
Thank you.