unreal.GoogleVRControllerFunctionLibrary
¶
-
class
unreal.
GoogleVRControllerFunctionLibrary
(outer=None, name='None')¶ Bases:
unreal.BlueprintFunctionLibrary
GoogleVRController Extensions Function Library
C++ Source:
Plugin: GoogleVRController
Module: GoogleVRController
File: GoogleVRControllerFunctionLibrary.h
-
classmethod
get_arm_model_added_elbow_depth
() → float¶ Get the elbow depth used by the arm model in meters. Used in the mathematical model for calculating the controller position/rotation.
- Returns
user height.
- Return type
-
classmethod
get_arm_model_added_elbow_height
() → float¶ Get the elbow height used by the arm model in meters. Used in the mathematical model for calculating the controller position/rotation.
- Returns
user height.
- Return type
-
classmethod
get_arm_model_is_locked_to_head
() → bool¶ Get if the Arm Model will be locked to the head Pose.
- Returns
true if it is locked to the Head Pose
- Return type
-
classmethod
get_arm_model_pointer_position_offset
() → Vector¶ Returns the local position of the pointer in the unreal coordinate system relative to the motion controller. The pointer is similar to the controller, except that it is slightly forward and rotated down by the pointer tilt angle. This is used to create more ergonomic comfort when pointing at things. This should be used for any reticle / laser implementation.
- Returns
pointer position.
- Return type
-
classmethod
get_arm_model_pointer_tilt_angle
() → float¶ Get the pointer tilt angle.
- Returns
degrees downward that the pointer tilts.
- Return type
-
classmethod
get_battery_charging
(hand=ControllerHand.ANY_HAND) → bool¶ Get whether the controller battery is currently charging. This may not be real time information and may be slow to be updated.
- Parameters
hand (ControllerHand) –
- Returns
true if the battery is charging.
- Return type
-
classmethod
get_battery_level
(hand=ControllerHand.ANY_HAND) → GoogleVRControllerBatteryLevel¶ Get the bucketed controller battery level. Note this is an approximate level described by enumeration, not a percent.
- Parameters
hand (ControllerHand) –
- Returns
the approximate battery level, or unknown if the level can not be determined.
- Return type
-
classmethod
get_controller_alpha_value
() → float¶ Get the current desired alpha value of the controller visual. This changes based on the FadeDistanceFromFace, and is used to prevent the controller From clipping awkwardly into the user’s face.
- Returns
value between 0 and 1.
- Return type
-
classmethod
get_fade_distance_from_face
() → float¶ Controller distance from the face after which the alpha value decreases (meters).
- Returns
fade distance from face in meters.
- Return type
-
classmethod
get_google_vr_controller_api_status
() → GoogleVRControllerAPIStatus¶ Get the GoogleVR Controller API status
- Returns
- Return type
-
classmethod
get_google_vr_controller_event_manager
() → GoogleVRControllerEventManager¶ Return a pointer to the UGoogleVRControllerEventManager to hook up GoogleVR Controller specific event.
- Returns
- Return type
-
classmethod
get_google_vr_controller_handedness
() → GoogleVRControllerHandedness¶ Get user’s handedness preference from GVRSDK
- Returns
A EGoogleVRControllerHandedness indicates the user’s handedness preference in GoogleVR Settings.
- Return type
-
classmethod
get_google_vr_controller_orientation
(hand=ControllerHand.ANY_HAND) → Rotator¶ This function return the orientation of the controller in unreal space.
- Parameters
hand (ControllerHand) –
- Returns
- Return type
-
classmethod
get_google_vr_controller_raw_accel
(hand=ControllerHand.ANY_HAND) → Vector¶ This function return the controller acceleration in gvr controller space.
- Parameters
hand (ControllerHand) –
- Returns
- Return type
-
classmethod
get_google_vr_controller_raw_gyro
(hand=ControllerHand.ANY_HAND) → Vector¶ This function return the controller angular velocity about each axis (positive means clockwise when sighting along axis) in gvr controller space.
- Parameters
hand (ControllerHand) –
- Returns
- Return type
-
classmethod
get_google_vr_controller_state
(hand=ControllerHand.ANY_HAND) → GoogleVRControllerState¶ Get the GoogleVR Controller state
- Parameters
hand (ControllerHand) –
- Returns
- Return type
-
classmethod
get_tooltip_alpha_value
() → float¶ Get the current desired alpha value of the tooltip visual. When the controller is farther than TooltipMinDistanceFromFace this becomes 0 When the controller is closer than FadeDistanceFromFace this becomes 0 This is used so that the tooltips are only visible when the controller is being held up.
- Returns
value between 0 and 1.
- Return type
-
classmethod
get_tooltip_max_angle_from_camera
() → int32¶ When the angle (degrees) between the controller and the head is larger than this value, the tooltip disappears. If the value is 180, then the tooltips are always shown. If the value is 90, the tooltips are only shown when they are facing the camera.
- Returns
tooltip max angle from camera in degrees.
- Return type
int32
-
classmethod
get_tooltip_min_distance_from_face
() → float¶ Controller distance from the face after which the tooltips appear (meters).
- Returns
tooltip mininum distance from face in meters.
- Return type
-
classmethod
is_arm_model_enabled
() → bool¶ Determine if the arm model is enabled
- Returns
true if the arm model is enabled
- Return type
-
classmethod
set_arm_model_added_elbow_depth
(elbow_depth) → None¶ Set the elbow depth used by the arm model in meters. Used in the mathematical model for calculating the controller position/rotation.
- Parameters
elbow_depth (float) –
-
classmethod
set_arm_model_added_elbow_height
(elbow_height) → None¶ Set the elbow height used by the arm model in meters. Used in the mathematical model for calculating the controller position/rotation.
- Parameters
elbow_height (float) –
-
classmethod
set_arm_model_enabled
(arm_model_enabled) → None¶ Set the arm model enabled/disabled
- Parameters
arm_model_enabled (bool) – value to set
-
classmethod
set_arm_model_is_locked_to_head
(is_locked_to_head) → None¶ Set if the Arm Model will be locked to the head Pose.
- Parameters
is_locked_to_head (bool) – value to set
-
classmethod
set_arm_model_pointer_tilt_angle
(tilt_angle) → None¶ Set the pointer tilt angle. Defaults to 15 degrees, which is comfortable for most use cases.
- Parameters
tilt_angle (float) – value to set
-
classmethod
set_fade_distance_from_face
(distance_from_face) → None¶ Controller distance from the face after which the alpha value decreases (meters).
- Parameters
distance_from_face (float) – value to set
-
classmethod
set_tooltip_max_angle_from_camera
(angle_from_camera) → None¶ When the angle (degrees) between the controller and the head is larger than this value, the tooltip disappears. If the value is 180, then the tooltips are always shown. If the value is 90, the tooltips are only shown when they are facing the camera.
- Parameters
angle_from_camera (int32) – value to set
-
classmethod
set_tooltip_min_distance_from_face
(distance_from_face) → None¶ Controller distance from the face after which the tooltips appear (meters).
- Parameters
distance_from_face (float) – value to set
-
classmethod
set_will_arm_model_use_accelerometer
(use_accelerometer) → None¶ Set if the arm model will use accelerometer data If this is turned on, then the arm model will estimate the position of the controller in space using accelerometer data. This is useful when trying to make the player feel like they are moving around a physical object. Not as useful when just interacting with UI.
- Parameters
use_accelerometer (bool) – value to set
-
classmethod
will_arm_model_use_accelerometer
() → bool¶ Get if the arm model will use accelerometer data If this is turned on, then the arm model will estimate the position of the controller in space using accelerometer data. This is useful when trying to make the player feel like they are moving around a physical object. Not as useful when just interacting with UI.
- Returns
true if accelerometer use is enabled
- Return type