Closed marcofugaro closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/pmndrs/use-cannon/CNq2DFLLj63akpzrKHPzm8oTF9oM
✅ Preview: https://use-cannon-git-fix-raycastvehicle-pmndrs.vercel.app
awesome @marcofugaro does this need a major? would you push to npm?
No major haha, this is just a small bugfix in the src
folder and other fixes in the examples
.
I'll let the maintainers publish a patch version when they can.
No major haha, this is just a small bugfix in the
src
folder and other fixes in theexamples
.I'll let the maintainers publish a patch version when they can.
i just checked you are a maintainer with full rights including npm :D
i'll make a patch release
Fixes #300
https://user-images.githubusercontent.com/7217420/147679112-a19e5816-ee9f-4907-acdc-e57a7014de9a.mov
Currently, the wheels in the useRaycastVehicle are orientated up (the debugger in #300 shows correctly what's going on).
This is because from v0.10.0 of cannon-es, the cylinder is created vertically, just like in three.js. So you need to rotate the cylinder by
-Math.PI / 2
to put it horizontally. I did this viauseCompoundBody
.Also, the
indexRightAxis
,indexForwardAxis
,indexUpAxis
order was somehow messed up, it has to reflect the values set here.The
||
operator had an issue as well, it would result in falsy if0
was passed.