File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
## [ Unreleased]
8
8
### Added
9
9
- Check if hand joints radius changed on hand update in ControllerInteraction.
10
+ - Check if isControllerActive and isHandActive on enable in ControllerInteraction.
10
11
11
12
## [ 0.5.2] - 2020-01-16
12
13
### Fixed
Original file line number Diff line number Diff line change @@ -69,6 +69,14 @@ private void Awake()
69
69
70
70
private void OnEnable ( )
71
71
{
72
+ if ( controller . isHandActive )
73
+ {
74
+ SetHandJointsVisible ( true ) ;
75
+ }
76
+ else if ( controller . isControllerActive )
77
+ {
78
+ SetControllerVisible ( true ) ;
79
+ }
72
80
controller . OnControllerActive += SetControllerVisible ;
73
81
controller . OnHandActive += SetHandJointsVisible ;
74
82
controller . OnHandUpdate += OnHandUpdate ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
### Added
9
9
- GetLocalRotation and GetLocalPosition to WebXRCamera.
10
10
- Support for the new/updated WebXR Hands API.
11
+ - isControllerActive and isHandActive to WebXRController.
11
12
12
13
### Changed
13
14
- Using ` frame.fillPoses ` and ` frame.fillJointRadii ` instead of ` frame.getJointPose ` for XRHand.
Original file line number Diff line number Diff line change @@ -57,6 +57,22 @@ public enum Axis2DTypes
57
57
58
58
private string [ ] profiles = null ;
59
59
60
+ public bool isControllerActive
61
+ {
62
+ get
63
+ {
64
+ return controllerActive ;
65
+ }
66
+ }
67
+
68
+ public bool isHandActive
69
+ {
70
+ get
71
+ {
72
+ return handActive ;
73
+ }
74
+ }
75
+
60
76
#if UNITY_EDITOR || ! UNITY_WEBGL
61
77
private InputDeviceCharacteristics xrHand = InputDeviceCharacteristics . Controller ;
62
78
private InputDevice ? inputDevice ;
You can’t perform that action at this time.
0 commit comments