Open gregfagan opened 7 years ago
Hm, if I include a delay before adding the dynamic-body
it also fixes things:
https://glitch.com/edit/#!/aframe-physics-rigidbody-remix?path=index.html:11:31
Seems like some kind of race condition but I'm not sure what's going on yet.
Also if you wait for the entity to load before adding dynamic-body
, it works
and calling el.body.updateMassProperties()
(after the box is "stuck") fixes it too. 🤔
Thanks for taking a look at this, I was able to fix the issue in my project with the loaded
event -- thought I had tried everything! Turns out I had only tried waiting until the body-loaded
event to set up my entities.
Scene demonstration: https://aframe-physics-rigidbody-issue.glitch.me/ Code: https://glitch.com/edit/#!/aframe-physics-rigidbody-issue?path=index.html:1:0
When dynamically spawning
dynamic-body
entities, some browsers (Firefox, Safari, Chrome) do not properly allow the yellow box, spawned aftersetTimeout
, to rotate. Edge appears to behave correctly. Theworker
driver appears to fix the issue.See the discussion beginning here: https://aframevr.slack.com/archives/C0FAACNA0/p1509646499000081