简体   繁体   中英

How to check Trigger between two kinematic RigidBodies

I have a object "A" with non convex mesh collider and kinematic rigidbodie and i wand to check trigger between Object "A" and another Game Object with non convex mesh collider and kinematic rigidbodie

As you see in this collision detection matrix:

Between two Kinematic the trigger is working and giving the message, so if you put both a trigger Collider it will give you a message.

If you want to be sure just add a tag to one and so you can also check the tag first and avoid wrong triggers:

void OnTriggerEnter(Collision other)
{
  if(other.compareTag("Trigger2")
// do things
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM