Open 3D Engine VirtualGamepad Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
VirtualGamepad::VirtualGamepadThumbStickComponent Class Reference

Inherits AZ::Component, UiInteractableBus::Handler, and VirtualGamepadThumbStickRequestBus::Handler.

Public Member Functions

 AZ_COMPONENT (VirtualGamepadThumbStickComponent, "{F3B59A92-BD6F-9CEC-A751-2EBC699992C5}", AZ::Component)
 

Static Public Member Functions

static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetDependentServices (AZ::ComponentDescriptor::DependencyArrayType &dependent)
 
static void Reflect (AZ::ReflectContext *context)
 AZ::ComponentDescriptor::Reflect
 

Protected Member Functions

void Init () override
 AZ::Component::Init
 
void Activate () override
 AZ::Component::Activate
 
void Deactivate () override
 AZ::Component::Deactivate
 
bool CanHandleEvent (AZ::Vector2 point) override
 UiInteractableInterface::CanHandleEvent
 
bool HandlePressed (AZ::Vector2 point, bool &shouldStayActive) override
 UiInteractableInterface::HandlePressed
 
bool HandleReleased (AZ::Vector2 point) override
 UiInteractableInterface::HandleReleased
 
bool HandleMultiTouchPressed (AZ::Vector2 point, int multiTouchIndex) override
 UiInteractableInterface::HandleMultiTouchPressed
 
bool HandleMultiTouchReleased (AZ::Vector2 point, int multiTouchIndex) override
 UiInteractableInterface::HandleMultiTouchReleased
 
void InputPositionUpdate (AZ::Vector2 point) override
 UiInteractableInterface::InputPositionUpdate
 
void MultiTouchPositionUpdate (AZ::Vector2 point, int multiTouchIndex) override
 UiInteractableInterface::MultiTouchPositionUpdate
 
void HandleHoverStart () override
 UiInteractableInterface::HandleHoverStart
 
void HandleHoverEnd () override
 UiInteractableInterface::HandleHoverEnd
 
bool GetIsAutoActivationEnabled () override
 UiInteractableInterface::GetIsAutoActivationEnabled
 
void SetIsAutoActivationEnabled (bool) override
 UiInteractableInterface::SetIsAutoActivationEnabled
 
AZ::Vector2 GetCurrentAxisValuesNormalized () const override
 VirtualGamepad::VirtualGamepadThumbStickRequests::GetCurrentAxisValuesNormalized
 
bool OnAnyTouchPressed (AZ::Vector2 viewportPositionPixels, int touchIndex)
 
bool OnAnyTouchReleased (AZ::Vector2 viewportPositionPixels, int touchIndex)
 
void OnAnyTouchPositionUpdate (AZ::Vector2 viewportPositionPixels, int touchIndex)
 
AZStd::vector< AZStd::string > GetAssignableInputChannelNames () const
 Get all potentially assignable input channel names.
 
AZStd::vector< AZStd::pair< AZ::EntityId, AZStd::string > > GetChildEntityIdNamePairs () const
 Get all child entity id/name pairs.
 

Member Function Documentation

◆ OnAnyTouchPositionUpdate()

void VirtualGamepad::VirtualGamepadThumbStickComponent::OnAnyTouchPositionUpdate ( AZ::Vector2  viewportPositionPixels,
int  touchIndex 
)
protected

Called when any touch position is updated

Parameters
[in]viewportPositionPixelsThe viewport position of the touch in pixels
[in]touchIndexThe touch index (0 based)

◆ OnAnyTouchPressed()

bool VirtualGamepad::VirtualGamepadThumbStickComponent::OnAnyTouchPressed ( AZ::Vector2  viewportPositionPixels,
int  touchIndex 
)
protected

Called when any touch is pressed

Parameters
[in]viewportPositionPixelsThe viewport position of the touch in pixels
[in]touchIndexThe touch index (0 based)
Returns
True if the touch was handled, false otherwise

◆ OnAnyTouchReleased()

bool VirtualGamepad::VirtualGamepadThumbStickComponent::OnAnyTouchReleased ( AZ::Vector2  viewportPositionPixels,
int  touchIndex 
)
protected

Called when any touch is released

Parameters
[in]viewportPositionPixelsThe viewport position of the touch in pixels
[in]touchIndexThe touch index (0 based)
Returns
True if the touch was handled, false otherwise

The documentation for this class was generated from the following file: