public void FireProjectile(PhxPawnController owner, Vector3 pos, Quaternion rot, PhxBolt bolt) { PhxProjectile proj = Projectiles.Alloc(); Physics.IgnoreCollision(proj.Coll, owner.Pawn.GetInstance().GetComponent <CapsuleCollider>()); if (proj != null) { proj.Setup(owner, pos, rot, bolt); } //Debug.Break(); }
void ProjectileHit(PhxProjectile proj, Collision coll) { Projectiles.Free(proj); ParticleSystem spark = Sparks.Alloc(); if (spark != null) { spark.transform.position = coll.contacts[0].point; spark.transform.forward = coll.contacts[0].normal; } else { Debug.LogWarning("Exceeded available spark effect instances!"); } }