Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes body.body in both physics plugins #301

Closed
wants to merge 3 commits into from

Conversation

Burstaholic
Copy link

Seems this one was missed in an update.

@Burstaholic Burstaholic changed the title Fixed updateBodyPosition in cannon plugin Fixes body.body in both physics plugins Oct 29, 2014
@ghost
Copy link

ghost commented Oct 29, 2014

Just wondering, how tested is this? I attempted to use the OIMO plugin, and it almost immediately crashed with this:

TypeError: Cannot read property 'next' of undefined
    at OimoJSPlugin.runOneStep (file:///lib/babylon.js:19357:36)
    at PhysicsEngine._runOneStep (file:///lib/babylon.js:19417:33)
    at Scene.render (file:///lib/babylon.js:11021:37)

The only way to fix it was to convert this.registeredMeshes[i].body to this.registeredMeshes[i].body.body twice in the code, which is a regression.

EDIT: CannonJS plugins appears to work properly though.

@Burstaholic
Copy link
Author

I did not test the OIMO plugin, I just assumed it needed the same fix. My bad, I'll fix the pull request.

@deltakosh
Copy link
Contributor

Hey I'll close this one and just update cannon.js :)

@deltakosh deltakosh closed this Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants