13 lines
272 B
TypeScript
13 lines
272 B
TypeScript
import { useEffect } from "react";
|
|
import { PointerLockControls } from "@react-three/drei";
|
|
|
|
export function PlayerCamera(): React.JSX.Element {
|
|
useEffect(() => {
|
|
return () => {
|
|
document.exitPointerLock();
|
|
};
|
|
}, []);
|
|
|
|
return <PointerLockControls />;
|
|
}
|