Merge branch 'change-direction-naming' of https://github.com/Duroxxigar/FlaxEngine into Duroxxigar-change-direction-naming
This commit is contained in:
@@ -822,6 +822,11 @@ void Actor::SetRotation(const Matrix& value)
|
||||
}
|
||||
|
||||
void Actor::SetDirection(const Float3& value)
|
||||
{
|
||||
SetForward(value);
|
||||
}
|
||||
|
||||
void Actor::SetForward(const Float3& value)
|
||||
{
|
||||
CHECK(!value.IsNanOrInfinity());
|
||||
Quaternion orientation;
|
||||
|
||||
@@ -549,18 +549,36 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets actor direction vector (forward vector).
|
||||
/// [Deprecated in v1.13]
|
||||
/// </summary>
|
||||
DEPRECATED("Use GetForward instead.")
|
||||
API_PROPERTY(Attributes="HideInEditor, NoSerialize") FORCE_INLINE Float3 GetDirection() const
|
||||
{
|
||||
return GetForward();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the actor's forward vector.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="HideInEditor, NoSerialize") FORCE_INLINE Float3 GetForward() const
|
||||
{
|
||||
return Float3::Transform(Float3::Forward, GetOrientation());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets actor direction vector (forward)
|
||||
/// [Deprecated in v1.13]
|
||||
/// </summary>
|
||||
/// <param name="value">The value to set.</param>
|
||||
DEPRECATED("Use SetForward instead.")
|
||||
API_PROPERTY() void SetDirection(const Float3& value);
|
||||
|
||||
/// <summary>
|
||||
/// Rotates the actor to align its forward vector with the passed in value.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to align to.</param>
|
||||
API_PROPERTY() void SetForward(const Float3& value);
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Resets the actor local transform.
|
||||
|
||||
Reference in New Issue
Block a user