pub struct AimConstraint {Show 16 fields
pub m_AffectRotationX: bool,
pub m_AffectRotationY: bool,
pub m_AffectRotationZ: bool,
pub m_AimVector: Vector3f,
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_RotationAtRest: Vector3f,
pub m_RotationOffset: Vector3f,
pub m_Sources: Vec<ConstraintSource>,
pub m_UpType: i32,
pub m_UpVector: Vector3f,
pub m_Weight: f32,
pub m_WorldUpObject: PPtr,
pub m_WorldUpVector: Vector3f,
pub m_Active: Option<bool>,
pub m_IsContraintActive: Option<bool>,
}Expand description
AimConstraint is a class of the Unity engine since version 2018.1.0b2. Exert from Unity’s scripting documentation: Constrains the orientation of an object relative to the position of one or more source objects, such that the object is facing the average position of the sources.
Fields§
§m_AffectRotationX: bool§m_AffectRotationY: bool§m_AffectRotationZ: bool§m_AimVector: Vector3fThe axis towards which the constrained object orients.
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_RotationOffset: Vector3fRepresents an offset from the constrained orientation.
m_Sources: Vec<ConstraintSource>§m_UpType: i32§m_UpVector: Vector3fThe up vector.
m_Weight: f32The weight of the constraint component.
m_WorldUpObject: PPtrThe world up object, used to calculate the world up vector when the world up Type is AimConstraint.WorldUpType.ObjectUp or AimConstraint.WorldUpType.ObjectRotationUp.
PPtr<Transform>: (2018.1.0b2 - 2022.3.2f1)
m_WorldUpVector: Vector3fThe world up Vector used when the world up type is AimConstraint.WorldUpType.Vector or AimConstraint.WorldUpType.ObjectRotationUp.
m_Active: Option<bool>bool: (2022.1.0b1 - 2022.3.2f1)
m_IsContraintActive: Option<bool>bool: (2018.1.0b2 - 2022.1.0a9)