Skip to content
Snippets Groups Projects
Commit 794eb43a authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Merge branch 'feature/improve-desktop-movement' into '4.26'

Fix weird desktop navigation

See merge request VR-Group/unreal-development/plugins/rwth-vr-toolkit!17
parents a980db01 d25d49f6
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
Pipeline #167474 passed
......@@ -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.
Finish editing this message first!
Please register or to comment