mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge pull request #13493 from alexiamandeville/sittingUpdate
Resolving issue where VR input for movement stops emotes
This commit is contained in:
commit
d9a3676c7c
1 changed files with 3 additions and 1 deletions
|
@ -101,6 +101,7 @@ function onWebEventReceived(event) {
|
|||
|
||||
// If user provides input during a sit, the avatar animation state should be restored
|
||||
Controller.keyPressEvent.connect(restoreAnimation);
|
||||
Controller.enableMapping(eventMappingName);
|
||||
MyAvatar.overrideAnimation(ANIMATIONS[emoteName].url, FPS, false, 0, frameCount);
|
||||
|
||||
} else {
|
||||
|
@ -132,6 +133,7 @@ function restoreAnimation() {
|
|||
|
||||
// Make sure the input is disconnected after animations are restored so it doesn't affect any emotes other than sit
|
||||
Controller.keyPressEvent.disconnect(restoreAnimation);
|
||||
Controller.disableMapping(eventMappingName);
|
||||
}
|
||||
|
||||
// Note peek() so as to not interfere with other mappings.
|
||||
|
@ -151,7 +153,7 @@ eventMapping.from(Controller.Standard.RS).peek().to(restoreAnimation);
|
|||
eventMapping.from(Controller.Standard.RightGrip).peek().to(restoreAnimation);
|
||||
eventMapping.from(Controller.Standard.Back).peek().to(restoreAnimation);
|
||||
eventMapping.from(Controller.Standard.Start).peek().to(restoreAnimation);
|
||||
Controller.enableMapping(eventMappingName);
|
||||
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
tablet.screenChanged.connect(onScreenChanged);
|
||||
|
|
Loading…
Reference in a new issue