Can't figure out my collision mistake, please help!

Hi Unity,

I’ve been working on this issue for about 3 days to no avail.

Issue:

I am trying to get a projectile’s capsule collider (with a rigidbody attached, no isTrigger) to collide with a player’s capsule collider (capsule collider with isTrigger).

I checked the collision matrix, but nothing seems to be happening? I’ll attach the relevant code below to see if it’s perhaps something wrong with the way it’s written.

Thanks for the help!

C#

if(hit.transform.tag == "BlueTeamTrigger" ||
			   hit.transform.tag == "RedTeamTrigger")
			{
				
				expended = true;
				
				//Instantiate an explosion effect.
				
				Instantiate(blasterExplosion, hit.point, Quaternion.identity);

The colliders attached to the players are children of the players, and are marked with RedTeamTrigger or BlueTeamTrigger Respective to what team they’re on.

I suggest you read this post.

http://answers.unity3d.com/questions/454479/toggling-is-trigger-on-box-collider-causes-it-to-n.html

“Hello. Is Trigger in unity disables the function of the collider and turns it into a passable trigger.”

Let me know if this helped you.