Hi iforce2D,
I can't seem to get angular damping to work with scenes running in the javascript testbed, even though it works perfectly in the editor. Is this a known problem/missing feature, or am I just doing something really stupid?
Thanks!
Problem with angular damping in javascript testbed
Re: Problem with angular damping in javascript testbed
Looks like it is missing from the loader... sorry!
You can add this to the loadBodyFromRUBE function:
You can add this to the loadBodyFromRUBE function:
Code: Select all
var bd = new b2BodyDef(); //after this...
...
// add these:
if ( bodyJso.hasOwnProperty('angularDamping') )
bd.angularDamping = bodyJso.angularDamping;
if ( bodyJso.hasOwnProperty('linearDamping') )
bd.linearDamping = bodyJso.linearDamping;
Re: Problem with angular damping in javascript testbed
Wow, thanks for the quick answer. That did indeed solve it and I feel only slightly stupid
Thank you also for a great editor, I've been having a lot of fun prototyping with it and would say it's well worth its money.
Thank you also for a great editor, I've been having a lot of fun prototyping with it and would say it's well worth its money.