fix(objects/hand): hand enabled when controller not
This commit is contained in:
@@ -149,10 +149,8 @@ fn main() -> Result<()> {
|
|||||||
.flatten();
|
.flatten();
|
||||||
|
|
||||||
if hands.is_none() {
|
if hands.is_none() {
|
||||||
// unsafe {
|
sk.input_hand_visible(Handed::Left, false);
|
||||||
// stereokit::sys::input_hand_visible(stereokit::sys::handed__handed_left, false as i32);
|
sk.input_hand_visible(Handed::Right, false);
|
||||||
// stereokit::sys::input_hand_visible(stereokit::sys::handed__handed_right, false as i32);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let (event_stop_tx, event_stop_rx) = oneshot::channel::<()>();
|
let (event_stop_tx, event_stop_rx) = oneshot::channel::<()>();
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ impl SkHand {
|
|||||||
let sk_hand = sk.input_hand(self.handed);
|
let sk_hand = sk.input_hand(self.handed);
|
||||||
if let InputType::Hand(hand) = &mut *self.input.specialization.lock() {
|
if let InputType::Hand(hand) = &mut *self.input.specialization.lock() {
|
||||||
let controller = sk.input_controller(self.handed);
|
let controller = sk.input_controller(self.handed);
|
||||||
*self.input.enabled.lock() = controller.tracked.contains(ButtonState::ACTIVE)
|
*self.input.enabled.lock() = controller.tracked.contains(ButtonState::INACTIVE)
|
||||||
&& sk_hand.tracked_state.contains(ButtonState::ACTIVE);
|
&& sk_hand.tracked_state.contains(ButtonState::ACTIVE);
|
||||||
if *self.input.enabled.lock() {
|
if *self.input.enabled.lock() {
|
||||||
hand.base.thumb.tip = convert_joint(sk_hand.fingers[0][4]);
|
hand.base.thumb.tip = convert_joint(sk_hand.fingers[0][4]);
|
||||||
|
|||||||
Reference in New Issue
Block a user