Order + Attributes + Return _up.

This commit is contained in:
2021-04-08 20:35:01 +02:00
parent 1610af3f3f
commit eff5d0899d
2 changed files with 7 additions and 6 deletions
@@ -92,7 +92,7 @@ void CharacterController::SetUpDirection(const Vector3& up)
Vector3 CharacterController::GetUpDirection() const
{
return _controller ? P2C(_controller->getUpDirection()) : Vector3::Up;
return _controller ? P2C(_controller->getUpDirection()) : _upDirection;
}
void CharacterController::SetMinMoveDistance(float value)
@@ -142,15 +142,16 @@ public:
/// </summary>
API_PROPERTY() void SetStepOffset(float value);
/// <summary>
/// Gets the character up vector.
/// </summary>
API_PROPERTY(Attributes="EditorOrder(240), DefaultValue(true), EditorDisplay(\"Character Controller\")")
Vector3 GetUpDirection() const;
/// <summary>
/// Sets the character up vector.
/// </summary>
API_PROPERTY() void SetUpDirection(const Vector3& up);
/// <summary>
/// Gets the character up vector.
/// </summary>
API_PROPERTY() Vector3 GetUpDirection() const;
/// <summary>
/// Gets the minimum move distance of the character controller. The minimum traveled distance to consider. If traveled distance is smaller, the character doesn't move. This is used to stop the recursive motion algorithm when remaining distance to travel is small.