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

Bug: fixing collisionreport data #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leberknecht
Copy link

getBody0() returns an object, therefore _objects_ammo[ manifold.getBody0() ]; results in undefined, and as reportdata is Float32Array, we end up with NaNin report data.
Using ammo-js v0.0.2 and chrome v43.0.2357.134

`getBody0()` returns an object, therefore `_objects_ammo[ manifold.getBody0() ];` results in `NaN` in report-data.
Using ammo-js v0.0.2 and chrome v43.0.2357.134
@seanjohnite
Copy link

God. I was just struggling with this for way too long. I think this happens with an updated version of Ammo.js. Replacing with the ammo.js found in the examples folder also fixed this issue.

@ribeirobreno
Copy link

#248

@acerix
Copy link

acerix commented Mar 25, 2016

I also spent a while tracking this issue down... What is holding back this patch?

To avoid breaking examples using an older ammo.js, would it be better to make it backwards compatible? eg. id = typeof body==='object' ? body.ptr : body

This also fixes issue #220.

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.

4 participants