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
...@@ -37,14 +37,28 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent) ...@@ -37,14 +37,28 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
// turning // turning
if (bAllowTurning) if (bAllowTurning)
{ {
// no snap turning for desktop mode if (bSnapTurn)
if (bSnapTurn && !URWTHVRUtilities::IsDesktopMode())
{ {
EI->BindAction(Turn, ETriggerEvent::Started, this, &UTurnComponent::OnBeginSnapTurn); // no snap turning for desktop mode
if (!URWTHVRUtilities::IsDesktopMode())
{
EI->BindAction(Turn, ETriggerEvent::Started, this, &UTurnComponent::OnBeginSnapTurn);
}
else
{
EI->BindAction(DesktopTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
} }
else else
{ {
EI->BindAction(DesktopTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn); if (!URWTHVRUtilities::IsDesktopMode())
{
EI->BindAction(Turn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
else
{
EI->BindAction(DesktopTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment