diff --git a/src/components/PlayerController.jsx b/src/components/PlayerController.jsx index 70edc1c..17b789e 100644 --- a/src/components/PlayerController.jsx +++ b/src/components/PlayerController.jsx @@ -32,6 +32,7 @@ export const PlayerController = () => { const rightPressed = useKeyboardControls((state) => state[Controls.right]); const jumpPressed = useKeyboardControls((state) => state[Controls.jump]); const shootPressed = useKeyboardControls((state) => state[Controls.shoot]); + const resetPressed = useKeyboardControls((state) => state[Controls.reset]); const [isOnGround, setIsOnGround] = useState(false); const body = useRef(); @@ -394,6 +395,11 @@ export const PlayerController = () => { // MISC + if(resetPressed) { + body.current.setTranslation({x: 8, y: 2, z: -119}); + } + + // ITEMS