Skip to content
Snippets Groups Projects
Commit d25d49f6 authored by Ehret's avatar Ehret
Browse files

use head forward/right etc. in destop mode, otherwise adjusting the right hand...

use head forward/right etc. in destop mode, otherwise adjusting the right hand to the mouse cursor also influences the forward travel direction, which feels weird
parent a980db01
No related branches found
No related tags found
2 merge requests!22Get changes and fixes from 4.26 into 5 as well,!17Fix weird desktop navigation
......@@ -113,26 +113,41 @@ void AVirtualRealityPawn::UpdateRightHandForDesktopInteraction()
void AVirtualRealityPawn::OnForward_Implementation(float Value)
{
if (RightHand)
//the right hand is rotated on desktop to follow the cursor so it's forward is also changing with cursor position
if (RightHand && !UVirtualRealityUtilities::IsDesktopMode())
{
AddMovementInput(RightHand->GetForwardVector(), Value);
}
else if (Head)
{
AddMovementInput(Head->GetForwardVector(), Value);
}
}
void AVirtualRealityPawn::OnRight_Implementation(float Value)
{
if (RightHand)
//the right hand is rotated on desktop to follow the cursor so it's forward is also changing with cursor position
if (RightHand && !UVirtualRealityUtilities::IsDesktopMode())
{
AddMovementInput(RightHand->GetRightVector(), Value);
}
else if (Head)
{
AddMovementInput(Head->GetRightVector(), Value);
}
}
void AVirtualRealityPawn::OnUp_Implementation(float Value)
{
if (RightHand)
//the right hand is rotated on desktop to follow the cursor so it's forward is also changing with cursor position
if (RightHand && !UVirtualRealityUtilities::IsDesktopMode())
{
AddMovementInput(RightHand->GetUpVector(), Value);
}
else if (Head)
{
AddMovementInput(Head->GetUpVector(), Value);
}
}
void AVirtualRealityPawn::OnTurnRate_Implementation(float Rate)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment