How to interact with the bodies using javascript
How to interact with the bodies using javascript
Once we export the json file and load it in js, hw can I apply forces,impulses to specific bodies,use contact listeners, etc???
Re: How to interact with the bodies using javascript
Check out the examples in the sampleLoaders folder (the one which uses ajac, not the 'standalone' one). For example in vehicles_bike.js, specific bodies are obtained with getNameBodies. You can see other available functions at the bottom of loadrube.js
You can also find some general info in the integrated help in RUBE ("Using exported data" -> "Supported loaders" -> "Javascript").
You can also find some general info in the integrated help in RUBE ("Using exported data" -> "Supported loaders" -> "Javascript").