How to fire a Projectile without a ProjectileShooter

Hi,
I'm trying to fire a Projectile by myself. Here is my steps:
1. I instantiate the prefab using ObjectPoolBase
2. Call the Initialize function.

But the projectile can collider with my character ( because there are decals on the character collider). However, my projectile takes no damage, please see the screenshot for my damage LayerMask.

Hope anyone can help me to solve it.

Thank you,

GameObject g = ObjectPoolBase.Instantiate(BulletPrefab, SoldierParticle.transform.position,
Quaternion.LookRotation(target
- SoldierParticle.transform.position)
) as GameObject;
Projectile projectile = g.GetComponent<Projectile>();
projectile.Initialize( projectile.transform.forward*15, Vector3.zero, gameObject );
1693635861738.png
 
Hi @Justin,
I'm sorry, maybe my question is not straightforward. The problem is I want the projectile to take damage to my character but it does not. It just hit the character and created some decals around my character.
 
For this I recommend placing a breakpoint within Health.Damage and seeing what part returns early.
 
Top