box2d-js icon indicating copy to clipboard operation
box2d-js copied to clipboard

Adjust mass in runtime

Open schteppe opened this issue 13 years ago • 4 comments

Hi,

I cannot seem to find some of the functions in box2d like SetMassData(), ResetMassData() etc for the body class that are explained in the box2d manual here: http://www.box2d.org/manual.html I am pretty sure they exist in the original C++ version of Box2d. Were these functions removed when porting to Flash? Or to JavaScript? Can they be included again somehow?

Thanks for the effort you've put into the code.

schteppe avatar Mar 23 '12 10:03 schteppe

Hi Stefan,

I had written / ported this code quite a while back and the project I was planning to use it for didn't leave the planning phase.

So, I won't be able to give a definite answer to this. I will keep this open, and if any of us finds an answer, let's update this issue.

Cheers, Harshad

hrj avatar Mar 23 '12 10:03 hrj

Okay, thanks. If I succeed to manually port these functions from the Box2D C++ code, I'll send you a pull request. Another question: how do I compile the files in js/ to lib/box2d.js?

schteppe avatar Mar 23 '12 11:03 schteppe

On Fri, Mar 23, 2012 at 5:00 PM, Stefan Hedman < [email protected]

wrote:

Another question: how do I compile the files in js/ to lib/box2d.js?

A simple concatenation would work IIRC. When publishing however, I use the YUI Compressor.

Again, sorry for being hazy. It's been a long time.

hrj avatar Mar 23 '12 11:03 hrj

OK, thanks :)

schteppe avatar Mar 23 '12 14:03 schteppe