Triggers colliding with triggers
So i have an enemy: has boxCollider for Range(this one is a trigger) and sphere collider for taking hits. NO rigidbody on it. Then i have a player with a boxCollider for range(also a trigger) and a sphere collider for taking hits and also has a rigidbody. My problem is when the range enemy is within range of attacking the player the player is far away from the enemy but if i attack with the player the players boxCollider triggers with the enemies range box collider and the players melee attack does damage due to this. Is there anyway i can avoid these 2 range checker colliders triggering each other?
Answer by eltonstrydom · Sep 03, 2017 at 04:38 PM
So I kind of found a fix if anyone was interested. Before i actually deal damage to the enemy my collider is touching i just check if the distance between the player and the enemy is <4f which is perfect for my melee player. So even though my trigger is registering the enemies range checking collider my player still cant do damage to something out of range.
Your answer
Follow this Question
Related Questions
Help with Trigger Colliders.. 0 Answers
Trigger enter and directly Exit 0 Answers
Question regarding OnTriggerEnter and Application.LoadLevel 1 Answer
How to delete one Gameobject in a Trigger? 0 Answers
AI and Enemy Detection 1 Answer