Skip to content
Snippets Groups Projects
Commit 3c7cf620 authored by Kris Tabea Helwig's avatar Kris Tabea Helwig
Browse files

fix(movement): Makes smooth turn usable for non-desktop devices again.

parent 1d06f8a8
No related branches found
No related tags found
2 merge requests!107UE5.4-2024.1-rc1,!100Splits mouse rotation from IA_Turn to avoid snap turn on CAVE
Pipeline #461594 failed
This commit is part of merge request !100. Comments created here will be created in the context of that merge request.
......@@ -36,9 +36,11 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
// turning
if (bAllowTurning)
{
if (bSnapTurn)
{
// no snap turning for desktop mode
if (bSnapTurn && !URWTHVRUtilities::IsDesktopMode())
if (!URWTHVRUtilities::IsDesktopMode())
{
EI->BindAction(Turn, ETriggerEvent::Started, this, &UTurnComponent::OnBeginSnapTurn);
}
......@@ -47,6 +49,18 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
EI->BindAction(DesktopTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
}
else
{
if (!URWTHVRUtilities::IsDesktopMode())
{
EI->BindAction(Turn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
else
{
EI->BindAction(DesktopTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
}
}
// bind additional functions for desktop rotations
if (URWTHVRUtilities::IsDesktopMode())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment