pub struct LookAtConstraint {
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_Roll: f32,
pub m_RotationAtRest: Vector3f,
pub m_RotationOffset: Vector3f,
pub m_Sources: Vec<ConstraintSource>,
pub m_UseUpObject: bool,
pub m_Weight: f32,
pub m_WorldUpObject: PPtr,
pub m_Active: Option<bool>,
pub m_IsContraintActive: Option<bool>,
}Expand description
LookAtConstraint is a class of the Unity engine since version 2018.2.0b1. 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. The LookAtConstraint is a simplified AimConstraint typically used with a Camera.
Fields§
§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.2.0b1 - 2022.3.2f1)
m_Roll: f32The rotation angle along the z axis of the object. The constraint uses this property to calculate the world up vector when Animations.LookAtConstraint.UseUpObject is false.
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_UseUpObject: boolDetermines how the up vector is calculated.
m_Weight: f32The weight of the constraint component.
m_WorldUpObject: PPtrThe world up object, used to calculate the world up vector when Animations.LookAtConstraint.UseUpObject is true.
PPtr<Transform>: (2018.2.0b1 - 2022.3.2f1)
m_Active: Option<bool>bool: (2022.1.0b1 - 2022.3.2f1)
m_IsContraintActive: Option<bool>bool: (2018.2.0b1 - 2022.1.0a9)