Cannon.js – Want to steer a car?? Then you need to make the HingeConstraint update-able

Hi…

 

I am playing around with Three.js and Cannon.js. Making my little car steerable needed to be able to update the characteristics of the hinge constraint during the runtime. What you need to do is the following:

Within the cannon.js file, locate the HingeConstraint constructor and add the follwoing lines of code:

With this, you can steer your car around…

CU

0xff

 

Leave a Reply

Your email address will not be published. Required fields are marked *