schteppe / cannon.js

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

Using the Raycast Vehicle class but having issues #461

Open Just-Kiel opened 3 years ago

Just-Kiel commented 3 years ago

Hello, I'm trying to use the Raycast Vehicle but it seems like I have some problems. When i want to ApplyEngineForce nothing happens, so someone could help me ? Thanks !

Just-Kiel commented 3 years ago

So I have now another problem which is that when i try to use setBrake property i get an error : "Uncaught TypeError: Cannot set property 'brake' of undefined"

If anybody has an idea why, i would be happy to discuss

tomo0613 commented 3 years ago

It's hard to tell what is the problem, without seeing the code, however I have some working examples that might can help you: https://github.com/tomo0613/offroadJS/blob/master/client/raycastVehicle.js https://github.com/tomo0613/offroadJS_v2/blob/master/src/vehicle/Vehicle.ts Also the official raycast vehicle demo should work.