pub struct ParentConstraint {Show 16 fields
pub m_AffectRotationX: bool,
pub m_AffectRotationY: bool,
pub m_AffectRotationZ: bool,
pub m_AffectTranslationX: bool,
pub m_AffectTranslationY: bool,
pub m_AffectTranslationZ: bool,
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_RotationAtRest: Vector3f,
pub m_RotationOffsets: Vec<Vector3f>,
pub m_Sources: Vec<ConstraintSource>,
pub m_TranslationAtRest: Vector3f,
pub m_TranslationOffsets: Vec<Vector3f>,
pub m_Weight: f32,
pub m_Active: Option<bool>,
pub m_IsContraintActive: Option<bool>,
}Expand description
ParentConstraint is a class of the Unity engine since version 2018.1.0b2. Exert from Unity’s scripting documentation: Constrains the orientation and translation of an object to one or more source objects. The constrained object behaves as if it is in the hierarchy of the sources.
Fields§
§m_AffectRotationX: bool§m_AffectRotationY: bool§m_AffectRotationZ: bool§m_AffectTranslationX: bool§m_AffectTranslationY: bool§m_AffectTranslationZ: bool§m_Enabled: u8Enabled Behaviours are Updated, disabled Behaviours are not.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (2018.1.0b2 - 2022.3.2f1)
m_RotationAtRest: Vector3fThe rotation used when the sources have a total weight of 0.
m_RotationOffsets: Vec<Vector3f>The rotation offsets from the constrained orientation.
m_Sources: Vec<ConstraintSource>§m_TranslationAtRest: Vector3fThe position of the object in local space, used when the sources have a total weight of 0.
m_TranslationOffsets: Vec<Vector3f>The translation offsets from the constrained orientation.
m_Weight: f32The weight of the constraint component.
m_Active: Option<bool>bool: (2022.1.0b1 - 2022.3.2f1)
m_IsContraintActive: Option<bool>bool: (2018.1.0b2 - 2022.1.0a9)