🚀 Auto-deploy: melhoria no snap e medição AR em 03/06/2026 10:31:54
This commit is contained in:
@@ -3,6 +3,7 @@ import { useFrame, useThree } from '@react-three/fiber';
|
||||
import * as THREE from 'three';
|
||||
// DEVKIT: remove this import + the fake-input block in useFrame to strip devkit
|
||||
import { fakeInput, isFakeActive } from '@/devkit/fakeInputStore';
|
||||
import { useModelStore } from '@/stores/useModelStore';
|
||||
|
||||
export interface GrabState {
|
||||
/** Analog grip pressure (0..1) */
|
||||
@@ -108,6 +109,10 @@ export function useControllerGrab() {
|
||||
const pose = frame.getPose(source.gripSpace, referenceSpace);
|
||||
if (pose) {
|
||||
slot.gripWorld.fromArray(pose.transform.matrix);
|
||||
const xrRig = useModelStore.getState().xrRig;
|
||||
if (xrRig) {
|
||||
slot.gripWorld.premultiply(xrRig.matrixWorld);
|
||||
}
|
||||
slot.hasPose = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user