Chipmunk and Javascript bindings - can't use getBody

Hey, I’m having the same issue using the iOS js bindings, getBody() is not implemented. Did you manage to work around this?

I tried to store the body after it’s creation and then rewrite the getBody() method, but as a result it still doesn’t behave well. If eg I want to get the rot (angle), it’s undefined(??).

Please, take a look at this! I am writing a comparative bachelor thesis right now, highlighting the advantages of cocos2d-x, but I’m stuck with this problem unable to go forth. Althrough cocos is otherwise very cool, I am so disapointed with all those hidden bugs…

If you don’t fix it, please add a alert on a home page, that it doesn’t fully support Chipmunk, so other developers may use other solutions.

Thank you very much.

Issue #3692 created for this

getBody function now have been binded

@kutakmir all properties of chipmunk can’t be accessed in JSB, as JSB only bind functions. Normally you should try to use a function to access to chose properties

Hello

I think i have a similar problem - when I do to run my js-game as native (mac) with chipmunk some a methods don’t work.
sometimes i have a message in console ‘body.isRogue or body.isStatic or is not function’ although function body.isSleeping is exists for example.

I tried update cocos and extension to last version but this was useless.
How can I to solve the problem?