Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

CollisionModule

struct in UnityEngine

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

Script interface for the Collision module.

Variables

bounceHow much force is applied to each particle after a collision.
collidesWithControl which layers this particle system collides with.
dampenHow much speed is lost from each particle after a collision.
enabledEnable/disable the Collision module.
enableDynamicCollidersAllow particles to collide with dynamic colliders when using world collision mode.
enableInteriorCollisionsAllow particles to collide when inside colliders.
lifetimeLossHow much a particle's lifetime is reduced after a collision.
maxCollisionShapesThe maximum number of collision shapes that will be considered for particle collisions. Excess shapes will be ignored. Terrains take priority.
maxPlaneCountThe maximum number of planes it is possible to set as colliders.
minKillSpeedKill particles whose speed falls below this threshold, after a collision.
modeChoose between 2D and 3D world collisions.
qualitySpecifies the accuracy of particle collisions against colliders in the scene.
radiusScaleA multiplier applied to the size of each particle before collisions are processed.
sendCollisionMessagesSend collision callback messages.
typeThe type of particle collision to perform.
voxelSizeSize of voxels in the collision cache.

Public Functions

GetPlaneGet a collision plane associated with this particle system.
SetPlaneSet a collision plane to be used with this particle system.