Hi . these are functions to move and rotate but my character moves to direction which it faces.
I wand movement to be independent of rotation. how can id fix it. I am trying to do the TwinStickShooter tutorial series in c++.
void AHeroCharacter::MoveUp(float Value)
{
if ((Value != 0.0f))
{
AddMovementInput(GetActorForwardVector(), Value);
}
}
void AHeroCharacter::MoveRight(float Value)
{
if ((Value != 0.0f))
{
AddMovementInput(GetActorRightVector(), Value);
}
}
void AHeroCharacter::lookUp(float Value)
{
AddControllerYawInput(Value * 40 * GetWorld()->GetDeltaSeconds());
}
void AHeroCharacter::LookRight(float Value)
{
AddControllerYawInput(Value * 40 * GetWorld()->GetDeltaSeconds());
}