Chipmunk physics body resetForces is not a function jsb, windows and ios

I am getting phBody.resetForces is not a function when i run my code via jsb on either windows or ios (phBody being a chipmunk physics body ). I am using 3.14 cocos2dxjs.

The code works fine on the web and HTML5.

Is there a function that i can use to get around this? can this be fixed?

if anybody else comes across this problem I have found a temp workaround that seems to work cross platform (HTML5, ios and windows). solution below:

 if (this.phBody.resetForces)
                this.phBody.resetForces();
    else
                this.phBody.setForce(cp.v(0, 0));

Essentially we check for existence of resetForces (it wont be present on native builds), if it is not present then we know we are in native environment so use setForce instead.


Doesn’t detract from the need to look at JSB and HTML5 consistencies. Particularly in the chipmunk area. (I have had to work around a few issues) If I had more time i would look into it, but under pressure to get a release together and I don’t know how to create JSB (yet).