I have an object that rotates along with my mouse, the camera is attached to it. Now I want the movement in the direction I rotated how would I go about that with axis inputs?
I replicated basic controls in the documentation, with
InputComponent->BindAxis("MoveForward", this, &ACameraPawn::MoveXAxis);
InputComponent->BindAxis("MoveRight", this, &ACameraPawn::MoveYAxis);
if (!CurrentVelocity.IsZero())
{
FVector NewLocation = GetActorLocation() + (CurrentVelocity * DeltaTime);
SetActorLocation(NewLocation);
}
But obviously it only moves in the same direction regardless of rotation.