# BabylonJS + cannon-es + raycastVehicle

**URL:** <https://forum.babylonjs.com/t/babylonjs-cannon-es-raycastvehicle/33194>\
**Category:** Questions\
**Tags:** cannon-es\
**Created:** [August 19, 2022, 2:49pm UTC](https://forum.babylonjs.com/t/babylonjs-cannon-es-raycastvehicle/33194 "2022-08-19T14:49:47Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![neu5](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neu5/32/24720_2.png) [@neu5](https://forum.babylonjs.com/u/neu5)\
**Post date:** [September 12, 2022, 12:38pm UTC](https://forum.babylonjs.com/t/babylonjs-cannon-es-raycastvehicle/33194/21 "2022-09-12T12:38:47Z")

</div>

I’ve changed the camera, and that the force is not applied now to the steering wheels

> **[Babylon.js Playground](https://playground.babylonjs.com/#112EAM%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

It does look like the wheels are working against each other?  
It’s really hard for me to find the solution because I don’t understand what is going on here. Do you know why it’s not working if the wheels are spinning in the same direction?

---

<div class="post-metadata">

**Author:** ![neu5](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neu5/32/24720_2.png) [@neu5](https://forum.babylonjs.com/u/neu5)\
**Post date:** [September 28, 2022, 2:50pm UTC](https://forum.babylonjs.com/t/babylonjs-cannon-es-raycastvehicle/33194/22 "2022-09-28T14:50:49Z")

</div>

Hello again, @RaananW 🙂  
So I started porting this `cannon-es-debugger` (which is working with ThreeJS only) to make this work with the BabylonJS to check if I can figure out how to build **raycastVehicle** with cannon-es and BabylonJS.  
It looks like I’m almost there:  
(driving the vehicle is WSAD, and toggling the debugger is `c`)  
[https://neu5.github.io/cannon-es-debugger-babylonjs/](https://neu5.github.io/cannon-es-debugger-babylonjs/)

1. I still have problem that the wheels are not spinning… I tried `rotationQuaternion` but with no luck.
2. The second problem is with the shadows. They’re getting worse and worse during the time. Did I screwed up something there?  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/d/dda5c4bee3265591d7d3e7df07c1b12cab6792b7.jpeg)

repo:

> **[GitHub - neu5/cannon-es-debugger-babylonjs: Wireframe debugger for use with...](https://github.com/neu5/cannon-es-debugger-babylonjs)**
>
> Wireframe debugger for use with cannon-es https://github.com/react-spring/cannon-es - GitHub - neu5/cannon-es-debugger-babylonjs: Wireframe debugger for use with cannon-es https://github.com/react-...

The code of the example is here:

> <https://github.com/neu5/cannon-es-debugger-babylonjs/blob/master/index.html>

I’d be glad if anyone could look at this 🙏

[Previous page](https://forum.babylonjs.com/t/babylonjs-cannon-es-raycastvehicle/33194.md?page=1)
