Hello! I hope you might be able to help me with a bit of plugin manipulation. I'm slowly honing my understanding of Javascript and the SDK but I've come up against a bit of a mental brick-wall. The problem could be as much to do with my limited understanding of the Box2D Physics plugin as much as my superficial knowledge of Javascript....
Here's the problem:
When I create an object with my behaviour, it receives a variable via the OnCreate function, from edittime.js, thus:
this.gravFactor = this.properties[8];[/code:hwl4jqr4]
So far, so good. Now, how can I access that instance variable gravFactor inside a Box2d function (my understanding of OOP is beaten here and I am about to resort to trial and error!):
[code:hwl4jqr4]Box2D.Dynamics.b2Island.prototype._InitializeVelocities = function(step, gravity)[/code:hwl4jqr4]
Getting this to work would be magic (and would open up a world of buoyant objects with different gravity values...). Thanks!