In this post, the accepted answer shows screenshots of editing the gravity vector and having a character rotate accordingly. When I do this:
UE_LOG(LogTemp, Warning, TEXT("Gravity before is %s"), *CharacterMovement->GetGravityDirection().ToString());
CharacterMovement->SetGravityDirection(GravityDirection);
UE_LOG(LogTemp, Warning, TEXT("Gravity after is %s"), *CharacterMovement->GetGravityDirection().ToString());
I see from the logs that the gravity direction is changing; however, the character does not rotate accordingly, nor is it drawn towards the source of my gravity. It seems like this value is completely ignored.
I can, of course, apply gravity myself:
CharacterMovement->AddForce(GravityDirection * GravityStrength * SphereMesh->GetMass() * CharacterMovement->Mass /SqrDistance);
But this does not rotate the character accordingly. Why is the SetGravityDirection function there if the value will just be ignored? Furthermore, any advice on how to achieve this effect?