Collision events are not reliably fired
See original GitHub issueI’ve forked the Jenga game and I’m trying to detect collisions between the table and the blocks, I’ve forked the game, and then added the following:
table.addEventListener('collision', function( other_object ) {
console.log('table collision', other_object);
});
Dragging blocks off the tower, and letting them fall onto the table, I expect to see a collision event fired, but I usually don’t. I notice that the blocks towards the bottom of the stack behave differently than the ones towards the top, but still not really what I expected: drop a block onto the table, get a collision event.
https://timdix.github.io/Physijs/examples/jenga.html
I’m very new to both Three.js and Physijs, any suggestions are greatly welcome.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Collision hit events are unreliable until physics simulation has ...
In the first part there are a number of obvious collisions that do not fire hit events. After enabling simulation on the static...
Read more >OnCollisionEnter() not always firing? - Unity Forum
I believe the physics engine does collisions at a certain time in each frame. IF one object moves thru another in the time...
Read more >Collision events sometime not fired - PlayCanvas Forum
Sometimes the 'collisionstart' event is not fired. This is very random as it can never happen, and suddenly happen 10 times in a...
Read more >Comprehensive and Collision Coverage : Farmers Insurance
Comprehensive provides coverage for events outside your control that are not caused by a collision, like weather, vandalism and theft.
Read more >Collision events between RNA polymerases in convergent ...
For the first time experimentally, the outcome of collision events during ... defined as initiation complexes that are waiting to 'fire' at a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, so after finding the “disable caching” checkbox in the Chrome developer window settings… I figured out the issue is with ammo.js. The latest version of ammo.js silently breaks collision detection. Reverting to the version of ammo.js included with the example http://chandlerprall.github.io/Physijs/examples/collisions.html solves the issue. I am continuing to dig into this because I think the newer version of ammo.js is faster and I’d like to use it…
Ok, so after a bit more investigation, it seems like changing the hostname is just a way of forcing a cache miss of some sort. The real problem seems to be with a newer version of three.js or physi.js. I’m looking at this hard and I hope to figure it out soon.