schteppe / cannon.js

A lightweight 3D physics engine written in JavaScript.

Home Page:http://schteppe.github.com/cannon.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using the Raycast Vehicle class but having issues

Just-Kiel opened this issue · comments

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 !

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

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.