Merge branch '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)
|
void Actor::SetDirection(const Float3& value)
|
||||||
|
{
|
||||||
|
SetForward(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Actor::SetForward(const Float3& value)
|
||||||
{
|
{
|
||||||
CHECK(!value.IsNanOrInfinity());
|
CHECK(!value.IsNanOrInfinity());
|
||||||
Quaternion orientation;
|
Quaternion orientation;
|
||||||
|
|||||||
@@ -549,18 +549,36 @@ public:
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets actor direction vector (forward vector).
|
/// Gets actor direction vector (forward vector).
|
||||||
|
/// [Deprecated in v1.13]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
DEPRECATED("Use GetForward instead.")
|
||||||
API_PROPERTY(Attributes="HideInEditor, NoSerialize") FORCE_INLINE Float3 GetDirection() const
|
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());
|
return Float3::Transform(Float3::Forward, GetOrientation());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets actor direction vector (forward)
|
/// Sets actor direction vector (forward)
|
||||||
|
/// [Deprecated in v1.13]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The value to set.</param>
|
/// <param name="value">The value to set.</param>
|
||||||
|
DEPRECATED("Use SetForward instead.")
|
||||||
API_PROPERTY() void SetDirection(const Float3& value);
|
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:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resets the actor local transform.
|
/// Resets the actor local transform.
|
||||||
|
|||||||
Reference in New Issue
Block a user