|
@@ -22,6 +22,8 @@
|
|
#include <Atom/RPI.Public/ViewportContext.h>
|
|
#include <Atom/RPI.Public/ViewportContext.h>
|
|
#include <Atom/RPI.Public/ViewportContextBus.h>
|
|
#include <Atom/RPI.Public/ViewportContextBus.h>
|
|
|
|
|
|
|
|
+#include "OpenXRVk/OpenXRVkUtils.h"
|
|
|
|
+
|
|
|
|
|
|
namespace OpenXRVk
|
|
namespace OpenXRVk
|
|
{
|
|
{
|
|
@@ -117,23 +119,6 @@ namespace OpenXRVk
|
|
AZ::TransformBus::Event(GetEntityId(), &AZ::TransformBus::Events::SetWorldTM, cameraTransform);
|
|
AZ::TransformBus::Event(GetEntityId(), &AZ::TransformBus::Events::SetWorldTM, cameraTransform);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- static float ReadActionHandleFloat(IOpenXRActions* iface, IOpenXRActions::ActionHandle actionHandle, float deadZone = 0.05f)
|
|
|
|
- {
|
|
|
|
- auto outcome = iface->GetActionStateFloat(actionHandle);
|
|
|
|
- if (!outcome.IsSuccess())
|
|
|
|
- {
|
|
|
|
- // Most likely the controller went to sleep.
|
|
|
|
- return 0.0f;
|
|
|
|
- }
|
|
|
|
- float value = outcome.GetValue();
|
|
|
|
- if (fabsf(value) < deadZone)
|
|
|
|
- {
|
|
|
|
- return 0.0f;
|
|
|
|
- }
|
|
|
|
- return value;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
void XRCameraMovementComponent::ProcessOpenXRActions()
|
|
void XRCameraMovementComponent::ProcessOpenXRActions()
|
|
{
|
|
{
|
|
auto actionsIFace = OpenXRActionsInterface::Get();
|
|
auto actionsIFace = OpenXRActionsInterface::Get();
|