We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { Canvas } from '@react-three/fiber' import { Physics, RigidBody, HeightfieldCollider } from '@react-three/rapier'
export default function App() { return ( <mesh position={[0, 2, 0]}> <boxGeometry args={[1, 1, 1]} /> ) }
function TestHeightfield() { // 2x2 grid => you need exactly 4 height values const heights = [0, 1, 1, 0];
return ( <HeightfieldCollider args={[2, 2, heights, { x: 1, y: 1, z: 1 }]} /> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
import { Canvas } from '@react-three/fiber'
import { Physics, RigidBody, HeightfieldCollider } from '@react-three/rapier'
export default function App() {
return (
<mesh position={[0, 2, 0]}>
<boxGeometry args={[1, 1, 1]} />
)
}
function TestHeightfield() {
// 2x2 grid => you need exactly 4 height values
const heights = [0, 1, 1, 0];
return (
<HeightfieldCollider
args={[2, 2, heights, { x: 1, y: 1, z: 1 }]}
/>
);
}
The text was updated successfully, but these errors were encountered: