Hello,
I want to move around a point (0,0,0) and always look at it.
This is what i actually have:
void ATowerBrickCharacter::MoveCharacterLeftRight(float Value)
{
if ((Controller != NULL) && (Value != 0.0f))
{
CharacterRotation = fmod(CharacterRotation, 360.0f) + Value;
FVector CharacterPosition;
CharacterPosition.X = (sinf(CharacterRotation)*CharacterDistanceRadius); //like the transformation of polarcoordinates to cartesian
CharacterPosition.Y = (cos(CharacterRotation)*CharacterDistanceRadius);
CharacterPosition.Z = 10;
SetActorLocation(CharacterPosition);
FRotator Rotation = GetActorRotation();
Rotation.Yaw = CharacterRotation;
SetActorRotation(Rotation);
}
}
The movement around the point works :).
But my camera doesn’t look at the point(0,0,0). It is just static and have always the same fov-direction.
So I would guess, that my character rotates (that does not have a graphical model), but the camera doesn’t.
Does someone have an idea how to get it work.
It would make me realy happy