schteppe / cannon.js

A lightweight 3D physics engine written in JavaScript.
http://schteppe.github.com/cannon.js
MIT License
4.72k stars 711 forks source link

RaycastVehicle.applyEngineForce() doesn't drive wheels #420

Closed SkaiCow closed 5 years ago

SkaiCow commented 5 years ago

I have been trying to get a RaycastVehicle to work for some time now and can't get it to drive.

I created an object which creates the car and adds 4 wheels. There's also an update function that take steering and throttle values and set them to the vehicle. Steering works perfectly fine, but it's the throttle that doesn't do anything. The wheels are getting EngineForce but don't rotate.

So, my question is why the applyEngineForce() isn't doing anything? and what things do I need to be looking for to get this car rolling? I'm betting it's some parameter I don't know I need. Any guess at what it is and lead me the right direction will be helpful.