CollisionModule

Struct CollisionModule 

Source
pub struct CollisionModule {
Show 31 fields pub enabled: bool, pub minKillSpeed: f32, pub _type: Option<i32>, pub bounce: Option<f32>, pub colliderForce: Option<f32>, pub collidesWith: Option<BitField>, pub collidesWithDynamic: Option<bool>, pub collisionMessages: Option<bool>, pub collisionMode: Option<i32>, pub dampen: Option<f32>, pub energyLossOnCollision: Option<f32>, pub interiorCollisions: Option<bool>, pub m_Bounce: Option<MinMaxCurve>, pub m_Dampen: Option<MinMaxCurve>, pub m_EnergyLossOnCollision: Option<MinMaxCurve>, pub m_Planes: Option<Vec<PPtr>>, pub maxCollisionShapes: Option<i32>, pub maxKillSpeed: Option<f32>, pub multiplyColliderForceByCollisionAngle: Option<bool>, pub multiplyColliderForceByParticleSize: Option<bool>, pub multiplyColliderForceByParticleSpeed: Option<bool>, pub particleRadius: Option<f32>, pub plane0: Option<PPtr>, pub plane1: Option<PPtr>, pub plane2: Option<PPtr>, pub plane3: Option<PPtr>, pub plane4: Option<PPtr>, pub plane5: Option<PPtr>, pub quality: Option<i32>, pub radiusScale: Option<f32>, pub voxelSize: Option<f32>,
}
Expand description

CollisionModule is a sub class of the Unity engine since version 3.5.0. Exert from Unity’s scripting documentation: Script interface for the CollisionModule of a Particle System. See Also: ParticleSystem, ParticleSystem.collision.

Fields§

§enabled: bool

Specifies whether the CollisionModule is enabled or disabled.

§minKillSpeed: f32

Kill particles whose speed falls below this threshold, after a collision.

§_type: Option<i32>

The type of particle collision to perform. i32: (3.5.0 - 2022.3.2f1)

§bounce: Option<f32>

How much force is applied to each particle after a collision. f32: (3.5.0 - 5.2.5f1)

§colliderForce: Option<f32>

How much force is applied to a Collider when hit by particles from this Particle System. f32: (2017.1.0b1 - 2022.3.2f1)

§collidesWith: Option<BitField>

Control which Layers this Particle System collides with. BitField: (4.0.0 - 2022.3.2f1)

§collidesWithDynamic: Option<bool>

bool: (5.3.0f1 - 2022.3.2f1)

§collisionMessages: Option<bool>

bool: (4.2.0 - 2022.3.2f1)

§collisionMode: Option<i32>

i32: (5.3.0f1 - 2022.3.2f1)

§dampen: Option<f32>

How much speed does each particle lose after a collision. f32: (3.5.0 - 5.2.5f1)

§energyLossOnCollision: Option<f32>

f32: (3.5.0 - 5.2.5f1)

§interiorCollisions: Option<bool>

bool: (5.3.0f1 - 2022.3.2f1)

§m_Bounce: Option<MinMaxCurve>

How much force is applied to each particle after a collision. MinMaxCurve: (5.3.0f1 - 2022.3.2f1)

§m_Dampen: Option<MinMaxCurve>

How much speed does each particle lose after a collision. MinMaxCurve: (5.3.0f1 - 2022.3.2f1)

§m_EnergyLossOnCollision: Option<MinMaxCurve>

MinMaxCurve: (5.3.0f1 - 2022.3.2f1)

§m_Planes: Option<Vec<PPtr>>

Vec<PPtr<Transform>>: (2020.2.0b1 - 2022.3.2f1)

§maxCollisionShapes: Option<i32>

The maximum number of collision shapes Unity considers for particle collisions. It ignores excess shapes. Terrains take priority. i32: (5.3.0f1 - 2022.3.2f1)

§maxKillSpeed: Option<f32>

Kill particles whose speed goes above this threshold, after a collision. f32: (5.4.0f3 - 2022.3.2f1)

§multiplyColliderForceByCollisionAngle: Option<bool>

Specifies whether the physics system considers the collision angle when it applies forces from particles to Colliders. bool: (2017.1.0b1 - 2022.3.2f1)

§multiplyColliderForceByParticleSize: Option<bool>

Specifies whether the physics system considers particle sizes when it applies forces to Colliders. bool: (2017.1.0b1 - 2022.3.2f1)

§multiplyColliderForceByParticleSpeed: Option<bool>

Specifies whether the physics system considers particle speeds when it applies forces to Colliders. bool: (2017.1.0b1 - 2022.3.2f1)

§particleRadius: Option<f32>

f32: (4.0.0 - 5.2.5f1)

§plane0: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§plane1: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§plane2: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§plane3: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§plane4: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§plane5: Option<PPtr>

PPtr<Transform>: (3.5.0 - 2020.2.0a13)

§quality: Option<i32>

Specifies the accuracy of particle collisions against colliders in the Scene. i32: (4.0.0 - 2022.3.2f1)

§radiusScale: Option<f32>

A multiplier that Unity applies to the size of each particle before collisions are processed. f32: (5.3.0f1 - 2022.3.2f1)

§voxelSize: Option<f32>

Size of voxels in the collision cache. f32: (4.0.0 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for CollisionModule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CollisionModule

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CollisionModule

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,