react-three-rapier icon indicating copy to clipboard operation
react-three-rapier copied to clipboard

Create react api for DynamicRayCastVehicleController

Open roman01la opened this issue 2 years ago • 6 comments

Hello. I see that r3p currently depends on rapier 0.11.1, however 0.17.0 got DynamicRayCastVehicleController. Would be great to have it exposed in r3p.

roman01la avatar Feb 25 '23 14:02 roman01la

For sure, it will be great to get this in rt/rapier!

But this is blocked on rapier.js bindings being updated to include the vehicle controller - https://github.com/dimforge/rapier.js

If you're keen to see this sooner, you could contribute to the bindings effort there. Last I heard on the dimforge discord someone was working on them, but it's been a while.

isaac-mason avatar Feb 25 '23 14:02 isaac-mason

There's also no open issue on rapier.js for adding vehicle bindings. Would be good to open one there to track.

isaac-mason avatar Feb 25 '23 14:02 isaac-mason

The vehicle controller is currently available through the canary release of @dimforge/rapier3d-compat

grndctrl avatar May 24 '23 19:05 grndctrl

Some folks on discord shared they are working around this by overriding the version of @dimforge/rapier3d-compat that @react-three/rapier uses. See: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

This isn't ideal though 😞 unfortunately the maintainer of rapier is busy with non-rapier work right now and hasn't had time to get a release out.

isaac-mason avatar Oct 01 '23 05:10 isaac-mason

@react-three/rapier now uses a version of rapier.js with the dynamic raycast vehicle controller.

Example of usage: https://sketches.isaacmason.com/sketch/rapier/dynamic-raycast-vehicle-controller https://github.com/isaac-mason/sketches/blob/main/src/sketches/rapier/dynamic-raycast-vehicle-controller/use-vehicle-controller.ts

isaac-mason avatar Apr 14 '24 13:04 isaac-mason