Unity3d How to achieve the collision of particle effects

Source: Internet
Author: User

After testing, we summarize some ideas about how to make particles and objects collide and how to make them disappear after a collision:

First, let's look at the configuration diagram of my particle system:

On the main configuration of collision detection We look at the collision in the picture:

The first item: because it is a 3D game, so here I choose the world

The second item (dampen): suppression (0~1), select this as 1 o'clock (complete suppression), after the collision, block the particles, can make the colliding particles disappear

Third item (Bounce): Bounce (0~2), after selecting this, you can let the colliding particles bounce off at an angle.

Third item (Lifetime Loss): Life cycle loss (0~1), the lifetime of the particle loss percentage after the collision, which is 1 o'clock (complete loss of life), can make the particles disappear

Item fourth (min Kill speed): The minimum purge rate, the larger the value, the faster the particle is removed after a collision, and when a value is reached, it can disappear immediately after the collision.

Item fifth (collides with): Collision range, setting the layer that can collide with the particle system

Sixth (collision quality): Collision quality, set the collision probability size of the collision, option three items from top to bottom from high to low, the lower the probability of collisions to the less

Item seventh (send collision Messages): Send collision information related to the following method

[CSharp]View plain copy
    1. The collision information that needs to be dealt with is placed on the object being hit.
    2. void Onparticlecollision (Gameobject other) {
    3. }


Summarize the following three ways to make a particle disappear:

(1) Set dampen to 1;

(2) Set lifetime loss to 1;

(3) Set a large min Kill speed value

Unity3d How to achieve the collision of particle effects

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.