Physics2DSettings

Struct Physics2DSettings 

Source
pub struct Physics2DSettings {
Show 29 fields pub m_DefaultMaterial: PPtr, pub m_Gravity: Vector2f, pub m_LayerCollisionMatrix: Vec<u32>, pub m_PositionIterations: i32, pub m_VelocityIterations: i32, pub m_AngularSleepTolerance: Option<f32>, pub m_AutoSimulation: Option<bool>, pub m_AutoSyncTransforms: Option<bool>, pub m_BaumgarteScale: Option<f32>, pub m_BaumgarteTimeOfImpactScale: Option<f32>, pub m_CallbacksOnDisable: Option<bool>, pub m_ChangeStopsCallbacks: Option<bool>, pub m_DefaultContactOffset: Option<f32>, pub m_DeleteStopsCallbacks: Option<bool>, pub m_JobOptions: Option<PhysicsJobOptions2D>, pub m_LinearSleepTolerance: Option<f32>, pub m_MaxAngularCorrection: Option<f32>, pub m_MaxLinearCorrection: Option<f32>, pub m_MaxRotationSpeed: Option<f32>, pub m_MaxTranslationSpeed: Option<f32>, pub m_MinPenetrationForPenalty: Option<f32>, pub m_QueriesHitTriggers: Option<bool>, pub m_QueriesStartInColliders: Option<bool>, pub m_RaycastsHitTriggers: Option<bool>, pub m_RaycastsStartInColliders: Option<bool>, pub m_ReuseCollisionCallbacks: Option<bool>, pub m_SimulationMode: Option<i32>, pub m_TimeToSleep: Option<f32>, pub m_VelocityThreshold: Option<f32>,
}
Expand description

Physics2DSettings is a class of the Unity engine since version 4.3.0.

Fields§

§m_DefaultMaterial: PPtr

PPtr<PhysicsMaterial2D>: (4.3.0 - 2022.3.2f1)

§m_Gravity: Vector2f§m_LayerCollisionMatrix: Vec<u32>§m_PositionIterations: i32§m_VelocityIterations: i32§m_AngularSleepTolerance: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_AutoSimulation: Option<bool>

bool: (2017.1.0b2 - 2019.4.40f1)

§m_AutoSyncTransforms: Option<bool>

bool: (2017.2.0b2 - 2022.3.2f1)

§m_BaumgarteScale: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_BaumgarteTimeOfImpactScale: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_CallbacksOnDisable: Option<bool>

bool: (5.6.1f1 - 2022.3.2f1)

§m_ChangeStopsCallbacks: Option<bool>

bool: (4.6.1 - 2017.4.40f1)

§m_DefaultContactOffset: Option<f32>

f32: (5.6.0f1 - 2022.3.2f1)

§m_DeleteStopsCallbacks: Option<bool>

bool: (4.5.3 - 4.6.0)

§m_JobOptions: Option<PhysicsJobOptions2D>

PhysicsJobOptions2D: (2018.1.0b2 - 2022.3.2f1)

§m_LinearSleepTolerance: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_MaxAngularCorrection: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_MaxLinearCorrection: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_MaxRotationSpeed: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_MaxTranslationSpeed: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_MinPenetrationForPenalty: Option<f32>

f32: (4.6.1 - 5.6.0b6)

§m_QueriesHitTriggers: Option<bool>

bool: (5.2.0f2 - 2022.3.2f1)

§m_QueriesStartInColliders: Option<bool>

bool: (5.2.0f2 - 2022.3.2f1)

§m_RaycastsHitTriggers: Option<bool>

bool: (4.3.0 - 5.1.5f1)

§m_RaycastsStartInColliders: Option<bool>

bool: (4.6.1 - 5.1.5f1)

§m_ReuseCollisionCallbacks: Option<bool>

bool: (2018.3.0f2 - 2022.3.2f1)

§m_SimulationMode: Option<i32>

i32: (2020.1.0b1 - 2022.3.2f1)

§m_TimeToSleep: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

§m_VelocityThreshold: Option<f32>

f32: (4.5.0 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for Physics2DSettings

Source§

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

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

impl<'de> Deserialize<'de> for Physics2DSettings

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 Physics2DSettings

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>,