Closed tommhuth closed 2 years ago
this seems wrong: let [ref] = useSphere(() => ({ mass: 5, args: [1], position: [0, 4, 0] }))
i don't think typescript would let you compile it: interface SphereProps extends BodyProps
args: 1 works ok, but i start to think we should make it an array just to remove the ambiguity. this has also caused problems with the debugger recently. in r3f i made all args use array notation for the same reason, i didn't want people to think back and forth. but for some reason use-cannon does it. :-S
oh you're right, that's definitely unexpected. would be great if args
always was an array, for consistency.
I tried setting up a very basic example with a simple sphere falling on to a static box, but I'm getting some unexpected wonkyness: regardless of what I set
restitution
to, the sphere will bouncy like crazy, even beyond what i would expectrestitution=1
to produce (https://codesandbox.io/s/restitution-yikqh). Am I missing something obvious again?