Wheel orientation incorrect on r3f cannon useRaycastVehicle

Hi all,

What should be a simple question but is frying my brain. I’m using the react-three/fiber and react-three/cannon to create a simple drivable vehicle using useRaycastVehicle, however while the vehicle works, if you turn debugging on you can see that the wheels are clearly orientated the wrong way in cannon

Screenshot 2022-12-15 at 09.43.02

I checked the official example on the cannon github, and they’re experiencing the exact same thing.

I thought it would simply be a case of rotation the wheel component, but that needs to all sorts of weird behaviours (the wheels detaching and driving in a separate direction to the car body), nothing I try works!

I’ve closed the official example here (with the debug component) to show the issue, but has anyone got any ideas on how to correctly align the cannon wheels with the wheel component?

Thanks in advance

that was probably my fault, i didn’t know what im doing tbh. i was just happy the car moves and never really checked how.

today i wouldn’t recommend cannon any longer, better to use rt/rapier. there seems to be a vehicle controller in the works for it as well now https://twitter.com/isaac_mason_/status/1601800966319538176

1 Like