-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Description
Performing a single pinch emits multiple "pinchstarted" and "pinchended" events on the Quest Pro (I don't have any other headsets to test this on). Here's a video of the issue comparing A-Frame 1.5.0 and 1.4.0
- A-Frame Version: 1.5.0
- Platform / Device: Quest Pro
- Reproducible Code Snippet or URL: glitch code and the live version
<html>
<head>
<title>A-Frame pinch issue on Quest Pro</title>
<script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-entity id="rightHand" hand-tracking-controls="hand: right;"></a-entity>
<a-camera>
<a-entity position="0 0 -1">
<a-text
id="numberOfPinches"
color="black"
align="center"
value="0 pinches"
></a-text>
<a-plane color="white" position="0 0 -0.01" height="0.3" width="1.1"></a-plane>
</a-entity>
<a-sky hide-on-enter-ar color="grey"></a-sky>
</a-camera>
</a-scene>
<script>
const rightHand = document.getElementById("rightHand");
let numberOfPinches = 0;
const numberOfPinchesEntity = document.getElementById("numberOfPinches");
rightHand.addEventListener("pinchstarted", (event) => {
numberOfPinches++;
console.log({ numberOfPinches });
numberOfPinchesEntity.setAttribute(
"value",
`${numberOfPinches} pinches`
);
});
</script>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels