Created
June 19, 2020 18:55
-
-
Save Franckapik/0540c44ca05e07ae5573178ff5eb6793 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [wheelShape, wheelApi] = useSphere(() => ({ | |
radius: 1.2, | |
})); | |
const [chassisShape, chassisApi] = useBox(() => ({ | |
args: [5, 2, 0.5], | |
mass: 1, | |
})); | |
const zero = [0, 0, 0]; | |
const leftAxis = [0,1,0] | |
const rightAxis = [0,-1,0] | |
const rightFrontAxis = [0,-1,0] | |
const leftFrontAxis = [0,1,0] | |
const cont = useHingeConstraint(()=> ( { | |
bodyA: chassisShape, | |
bodyB: wheelShape, | |
optns: { | |
pivotA: [5,5,0], | |
axisA: leftFrontAxis, | |
pivotB:zero, | |
axisB:leftAxis | |
}})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment