I want to create a power up that when the player collects it increases the damage.
For some reason this doesn’t work and the cast doesn’t go to the projectile seen here.
Any idea why this is happening?
I want to create a power up that when the player collects it increases the damage.
For some reason this doesn’t work and the cast doesn’t go to the projectile seen here.
Any idea why this is happening?
I might be wrong, but I think you’re casting to the wrong thing here. Right now the (I assume powerup?) is using casting to check if the thing that it’s overlapping with is a projectile and not a player character ( I assume that you want to pick it up with the character and not by shooting?). This is why it stops at casting.
Also I don’t think that you can put the damage value inside the projectile itself because the powerup will then only power up the damage of existing projectiles. The ones you shoot afterwards will have the default value again.
Hope this helps!