Merge branch 'Duroxxigar-change-lookingatdirection-name'
This commit is contained in:
@@ -1730,6 +1730,11 @@ void Actor::LookAt(const Vector3& worldPos, const Vector3& worldUp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Quaternion Actor::LookingAt(const Vector3& worldPos) const
|
Quaternion Actor::LookingAt(const Vector3& worldPos) const
|
||||||
|
{
|
||||||
|
return GetLookAtDirection(worldPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Quaternion Actor::GetLookAtDirection(const Vector3& worldPos) const
|
||||||
{
|
{
|
||||||
const Vector3 direction = worldPos - _transform.Translation;
|
const Vector3 direction = worldPos - _transform.Translation;
|
||||||
if (direction.LengthSquared() < ZeroTolerance)
|
if (direction.LengthSquared() < ZeroTolerance)
|
||||||
@@ -1757,6 +1762,11 @@ Quaternion Actor::LookingAt(const Vector3& worldPos) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
Quaternion Actor::LookingAt(const Vector3& worldPos, const Vector3& worldUp) const
|
Quaternion Actor::LookingAt(const Vector3& worldPos, const Vector3& worldUp) const
|
||||||
|
{
|
||||||
|
return GetLookAtDirection(worldPos, worldUp);
|
||||||
|
}
|
||||||
|
|
||||||
|
Quaternion Actor::GetLookAtDirection(const Vector3& worldPos, const Vector3& worldUp) const
|
||||||
{
|
{
|
||||||
const Vector3 direction = worldPos - _transform.Translation;
|
const Vector3 direction = worldPos - _transform.Translation;
|
||||||
if (direction.LengthSquared() < ZeroTolerance)
|
if (direction.LengthSquared() < ZeroTolerance)
|
||||||
|
|||||||
@@ -915,16 +915,33 @@ public:
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets rotation of the actor oriented towards the specified world position.
|
/// Gets rotation of the actor oriented towards the specified world position.
|
||||||
|
/// [Deprecated in v1.13]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="worldPos">The world position to orient towards.</param>
|
/// <param name="worldPos">The world position to orient towards.</param>
|
||||||
|
DEPRECATED("Use GetLookAtDirection instead.")
|
||||||
API_FUNCTION() Quaternion LookingAt(const Vector3& worldPos) const;
|
API_FUNCTION() Quaternion LookingAt(const Vector3& worldPos) const;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets rotation of the actor oriented towards the specified world position.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="worldPos">The world position to orient towards.</param>
|
||||||
|
API_FUNCTION() Quaternion GetLookAtDirection(const Vector3& worldPos) const;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets rotation of the actor oriented towards the specified world position with upwards direction.
|
||||||
|
/// [Deprecated in v1.13]
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="worldPos">The world position to orient towards.</param>
|
||||||
|
/// <param name="worldUp">The up direction that constrains up axis orientation to a plane this vector lies on. This rule might be broken if forward and up direction are nearly parallel.</param>
|
||||||
|
DEPRECATED("Use GetLookAtDirection instead.")
|
||||||
|
API_FUNCTION() Quaternion LookingAt(const Vector3& worldPos, const Vector3& worldUp) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets rotation of the actor oriented towards the specified world position with upwards direction.
|
/// Gets rotation of the actor oriented towards the specified world position with upwards direction.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="worldPos">The world position to orient towards.</param>
|
/// <param name="worldPos">The world position to orient towards.</param>
|
||||||
/// <param name="worldUp">The up direction that constrains up axis orientation to a plane this vector lies on. This rule might be broken if forward and up direction are nearly parallel.</param>
|
/// <param name="worldUp">The up direction that constrains up axis orientation to a plane this vector lies on. This rule might be broken if forward and up direction are nearly parallel.</param>
|
||||||
API_FUNCTION() Quaternion LookingAt(const Vector3& worldPos, const Vector3& worldUp) const;
|
API_FUNCTION() Quaternion GetLookAtDirection(const Vector3& worldPos, const Vector3& worldUp) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user