schteppe / cannon.js

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

Inclined plane and friction #288

Open djrockin opened 8 years ago

djrockin commented 8 years ago

How to increase the angle of inclined plane until cube starts to move

schteppe commented 8 years ago

Hi. How do you want to implement this? Do you want the plane to be slowly animated, or do you maybe want to create 10 different ones with different inclinations?

If you want it to be animated you should make the plane kinematic (see the kinematic demo) and then set the angular velocity to make it rotate.

If you want to create 10 (or any other number) scene setups then you could use a for loop. See the demos.

Just a note. The theoretical "slip angle" will probably not match what you get out of this experiment. If you want it to match you should use some more reliable simulation software.