This repository was archived by the owner on Feb 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Correction for simulated movement with enhanced input in public/0.12.x-UE5.1 #74
Copy link
Copy link
Open
Description
I encountered some frustration with the camera and hands movement while using the simulated features. Upon delving into the code, I discovered that the AXRSimulationActor's Input actions were utilizing UInputTriggerDown triggers. These triggers processed input only when passing a 0.5 threshold, which proved less than ideal for achieving precise movement.
To address this, I propose a modification: refrain from adding the UInputTriggerDown trigger when creating the Input actions in the XRSimulationActor.cpp file. This adjustment ensures a smoother and more accurate user experience.
File: XRSimulationActor.cpp
void AXRSimulationActor::RegisterEnhancedInputAxis(UInputAction*& Action, FText Description, TArray<FKey> Keys, bool Negate)
{
Action = NewObject<UInputAction>();
Action->AddToRoot();
Action->ActionDescription = Description;
// Remove this line
// Action->Triggers.Add(NewObject<UInputTriggerDown>());
Action->bConsumeInput = false;
Action->ValueType = EInputActionValueType::Axis1D;
if (Negate)
{
Action->Modifiers.Add(NewObject<UInputModifierNegate>());
}
for (FKey Key : Keys)
{
InputMappingContext->MapKey(Action, Key);
}
}
void AXRSimulationActor::RegisterEnhancedInputAction(UInputAction*& Action, FText Description, TArray<FKey> Keys)
{
Action = NewObject<UInputAction>();
Action->AddToRoot();
Action->ActionDescription = Description;
// Remove this line
// Action->Triggers.Add(NewObject<UInputTriggerDown>());
Action->bConsumeInput = false;
for (FKey Key : Keys)
{
InputMappingContext->MapKey(Action, Key);
}
}Metadata
Metadata
Assignees
Labels
No labels