Collision Body (Collider) and trigger (is Trigger)----collision conditions, triggering the conditions of the collider and trigger

Source: Internet
Author: User
One: Collision conditions 1: To create a collision, both sides must have a collider. 2: The movement of the party must have a rigid body, the other side has no rigid body does not matter. Note: If the moving side has no rigid body, it collides with the stationary rigid body, which is equivalent to not being mounted.
Two: Contact 1:collision collision, resulting in physical collisions, you can perform the Oncollision event at the time of the collision. 2:trigger triggers, cancels all physical collisions, and can execute Ontrigger events when triggered. Note: Two-object contact is not possible to produce a collision + contact at the same time. However, a collision can occur with AB, and AC generates a trigger.
Three: conditions that produce different ways of contact 1:collision collision (1): Both sides have a collision body (2): The movement of the party must have a rigid body (3): The two sides can not simultaneously tick kinematic kinematics. (4): Trigger trigger cannot be checked on both sides. 2:trigger Trigger (1): Both sides have a collision body (2): The movement must be a rigid body (3): At least one side tick trigger trigger
Four: After contact the event is subdivided into enter,stay,exit three kinds (take trigger as an example, Ontriggerenter, Ontriggerstay, ontriggerexit respectively) 1:enter event indicates that two objects contact instantaneous, will execute once. The 2:stay event indicates that the two objects are continuously in contact and will continue to execute. 3:exit event when two objects are separated for an instant, they are executed once.
V: Collision Rules Table
Collision detection and sending messages during a collision
Static colliding body (static Collider) Rigid Body Collider (Rigidbody Collider) Kinematic Rigid Body Collider (kinematic rigidbody Collider) Static trigger collision Body (Static Trigger Collider) Rigid Body Trigger Collider (rigidbody Trigger Collider) Kinematic rigid body triggering collision body (kinematic rigidbody Trigger Collider)
Static colliding body (static Collider) Y
Rigid Body Collider (Rigidbody Collider) Y Y Y
Kinematic Rigid Body Collider (kinematic rigidbody Collider) Y
Static trigger collision Body (Static Trigger Collider)
Rigid Body Trigger Collider (rigidbody Trigger Collider)
Kinematic rigid body triggering collision body (kinematic rigidbody Trigger Collider)
Send trigger (Trigger) message during collision
Static colliding body (static Collider) Rigid Body Collider (Rigidbody Collider) Kinematic Rigid Body Collider (kinematic rigidbody Collider) Static trigger collision Body (Static Trigger Collider) Rigid Body Trigger Collider (rigidbody Trigger Collider) Kinematic rigid body triggering collision body (kinematic rigidbody Trigger Collider)
Static colliding body (static Collider) Y Y
Rigid Body Collider (Rigidbody Collider) Y Y Y
Kinematic Rigid Body Collider (kinematic rigidbody Collider) Y Y Y
Static trigger collision Body (Static Trigger Collider) Y Y Y Y
Rigid Body Trigger Collider (rigidbody Trigger Collider) Y Y Y Y Y Y
Kinematic rigid body triggering collision body (kinematic rigidbody Trigger Collider) Y Y Y Y Y Y


VI: Experimental table



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.