Search Results for

    Show / Hide Table of Contents

    Class LookAtBehavior

    Behavior that allows an entity to look at the camera or another entity.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Behavior
    LookAtBehavior
    Implements
    IDependencyObject
    Inherited Members
    Behavior.Family
    Behavior.UpdateOrder
    Behavior.OnDetach()
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.OnActivated()
    Component.Start()
    Component.OnDeactivated()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Components.Toolkit
    Assembly: Evergine.Components.dll
    Syntax
    public class LookAtBehavior : Behavior, IDependencyObject

    Fields

    transform

    The owning transform.

    Declaration
    [BindComponent(true, true, BindComponentSource.Owner, null, true)]
    protected Transform3D transform
    Field Value
    Type Description
    Transform3D

    Properties

    Axis

    Gets or sets a value indicating the axis of the entity to be aligned.

    Declaration
    [RenderProperty(Tooltip = "The axis of the entity used for the alignment")]
    public LookAtBehavior.AxisEnum Axis { get; set; }
    Property Value
    Type Description
    LookAtBehavior.AxisEnum

    AxisConstraint

    Gets or sets a value indicating whether the entity looks at the target by rotating in only one axis.

    Declaration
    [RenderProperty(Tag = 1, CustomPropertyName = "Axis Constraint", Tooltip = "If true, the orientation is restricted to just one axis.")]
    public bool AxisConstraint { get; set; }
    Property Value
    Type Description
    bool

    Flip

    Gets or sets a value indicating whether the alignment is flipped.

    Declaration
    [RenderProperty(Tooltip = "Flips the alignment")]
    public bool Flip { get; set; }
    Property Value
    Type Description
    bool

    IsLocalOriented

    Gets or sets a value indicating whether the alignment is in the local axis or the absolute axis.

    Declaration
    [RenderProperty(AttachToTag = 1, AttachToValue = true, CustomPropertyName = "Is Local Oriented", Tooltip = "If true, the constraint alignment is made using local orientations")]
    public bool IsLocalOriented { get; set; }
    Property Value
    Type Description
    bool

    KeepUpVector

    Gets or sets a value indicating whether the up vector must always be up.

    Declaration
    [RenderProperty(AttachToTag = 1, AttachToValue = true, Tooltip = "Keep up vector.")]
    public bool KeepUpVector { get; set; }
    Property Value
    Type Description
    bool

    LookAtEntity

    Gets or sets a value indicating whether the entity looks at another entity instead of the camera.

    Declaration
    [RenderProperty(Tag = 2, CustomPropertyName = "Look At Entity", Tooltip = "If true, the entity looks at another entity. If false, it looks to the camera")]
    public bool LookAtEntity { get; set; }
    Property Value
    Type Description
    bool

    OrientationAxis

    Gets or sets a value indicating the rotating axis of the alignment.

    Declaration
    [RenderProperty(AttachToTag = 1, AttachToValue = true, CustomPropertyName = "Orientation Axis", Tooltip = "The constraint axis used by the entity to orientate to its target")]
    public LookAtBehavior.AxisEnum OrientationAxis { get; set; }
    Property Value
    Type Description
    LookAtBehavior.AxisEnum

    TargetEntity

    Gets or sets the target entity path.

    Declaration
    public Entity TargetEntity { get; set; }
    Property Value
    Type Description
    Entity

    Methods

    OnAttached()

    Invoked when the object is attached to the system.

    Declaration
    protected override bool OnAttached()
    Returns
    Type Description
    bool

    True if everything is OK.

    Overrides
    Behavior.OnAttached()

    Update(TimeSpan)

    Updates the behavior.

    Declaration
    protected override void Update(TimeSpan gameTime)
    Parameters
    Type Name Description
    TimeSpan gameTime

    Elapsed game time.

    Overrides
    Behavior.Update(TimeSpan)

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX