docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Collision Shape Block reference

    The Collision Shape Block defines a shape that particles collide with.

    A cascade of particles falls onto the upper surface of a cube and cascades down the side.

    A car-shaped signed distance field made up of particles.

    If you change the Behavior property of the block, the Block changes to the following:

    • A Kill Shape Block if you set Behavior to Kill.
    • A Trigger Shape Block if you set Behavior to None.

    Block compatibility

    You can add the Collision Shape Block to the following Contexts:

    • Initialize
    • Update

    To add a Collision Shape Block to your graph, open the menu for adding a graph element then select Collision > Collision Shape.

    Block settings

    Property Type Description
    Shape Enum Sets the shape for particles to collide with. For more information, refer to the Shape dropdown section.
    Mode Enum Specifies how particles interact with the collider. The options are:
    • Solid: Stops particles entering the collider. If you set Shape to Plane, particles collide with the plane when they travel away from the normal of the plane.
    • Inverted: Stops particles leaving the shape volume. If you set Shape to Plane, particles collide with the plane when they travel in the same direction as the normal of the plane.
    Radius Mode Enum Sets the collision radius of the particles. The options are:
    • None: Sets the collision radius to zero.
    • From Size: Sets the collision radius for each particle to its individual size.
    • Custom: Sets the collision radius to the value of Radius in the Block properties.
    Collision Attributes Enum Specifies whether Unity stores data in the collision attributes of particles. The options are:
    • No Write: Doesn't write or store collision attributes.
    • Write Punctual Contact only: Updates the collision attribute only when a specific, single-point collision occurs. This prevents Unity updating the collision attributes repeatedly when a particle slides along a collision shape. To increase or decrease how much a particle needs to bounce off a shape to cause a collision response, enable Override Bounce Threshold in the Inspector window.
    • Write Always: Updates the collision attribute every time a collision occurs.
    Rough Surface Boolean Adds randomness to the direction in which particles bounce back, to simulate collision with a rough surface. To set the roughness of the surface, use the Roughness property.

    Shape dropdown

    Shape Description
    Sphere Sets the collision shape as a spherical volume.
    Oriented Box Sets the collision shape as a box volume.
    Cone Sets the collision shape as truncated cone volume.
    Plane Sets the collision shape as a flat plane with infinite length and width.
    Signed Distance Field Sets the collision shape as a signed distance field (SDF), so you can create precise complex collision with an existing asset. To generate a signed distance field asset, use the SDF Bake Tool or an external digital content creation (DCC) tool.

    Block properties

    Input Type Description
    Sphere Sphere Sets the sphere that particles collide with. This property is available only if you set Shape to Sphere.
    Box OrientedBox Sets the box that particles collide with. This property is available only if you set Shape to Box.
    Cone Cone Sets the cone that particles collide with. This property is available only if you set Shape to Cone.
    Plane Plane Sets the plane that particles collide with. This property is available only if you set Shape to Plane.
    Distance Field Signed distance field Sets the signed distance field (SDF) that particles collide with. This property is available only if you set Shape to Signed Distance Field.
    Field Transform Transform Sets the position, size, and rotation of the Distance Field. This property is available only if you set Shape to Signed Distance Field.
    Bounce Float Sets how strongly particles bounce away from a collision. A value of 0 means the particles don't bounce. A value of 1 means particles bounce away at the same speed they collided at.
    Friction Float Sets how much speed particles lose during a collision. The minimum value is 0.
    Bounce Speed Threshold Float Sets the minimum speed for a bounce that causes Unity to update the collision attribute for a particle, if you set Collision Attributes to Write Punctual Contact Only. The default value is 1. This property is available only if you enable Override Bounce Threshold in the Inspector window.
    Lifetime Loss Float Sets how much life particles lose after a collision.
    Radius Float Sets the collision radius of the particles. This property is available only if you set Radius Mode to Custom.
    Roughness Float Sets the roughness of the surface, by adjusting how randomly particles change direction after they collide with the surface. This property is available only if you enable Rough Surface.

    Inspector window properties

    Property Type Description
    Behavior Enum Specifies how particles behave when they collide with the shape. The options are:
    • None: Changes the Block to a Trigger Shape Block, so particles don't bounce off the shape.
    • Collision: Causes particles to bounce off the shape. This is the default in a Collision Shape Block.
    • Kill: Changes the Block to a Kill Shape Block, so particles are destroyed when they collide with the shape.
    Write Rough Normal Boolean When enabled, Unity writes the version of the normal with roughness applied to the Collision Event Normal attribute.
    Override Bounce Threshold Boolean Makes the Bounce Speed Threshold setting available in the Block properties.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)