Oimo.js
Oimo.js copied to clipboard
Contact callback
Hi, is there any way to get a callback when two objects collide? or better still attach a callback to a specific rigid body and get a callback when it collides with something?
I have seen this demo but this technique requires me to check every rigid body against every other rigid body to know if anything is colliding.
Imagine that the player in my game fires a bullet and I want to know when/if it hits anything. Testing each bullet against every object in the scene on each step is obviously not feasible.
Thanks.
Hi i update physics engine with new version you have more option for collision callback you can use new lib https://github.com/lo-th/phy
On Tue, Jul 27, 2021 at 4:03 PM Bikeman868 @.***> wrote:
Hi, is there any way to get a callback when two objects collide? or better still attach a callback to a specific rigid body and get a callback when it collides with something?
I have seen this demo http://lo-th.github.io/Oimo.js/index.html#rotation but this technique requires me to check every rigid body against every other rigid body to know if anything is colliding.
Imagine that the player in my game fires a bullet and I want to know when/if it hits anything. Testing each bullet against every object in the scene on each step is obviously not feasible.
Thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lo-th/Oimo.js/issues/101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL3GOCZTWUO52WEXGEFSETTZ24B5ANCNFSM5BCJ5KBA .
-- lo.th http://lo.th - Freelance wegl developper & 3d modeler - github https://github.com/lo-th- twitter https://twitter.com/3dflashlo
From the readme it looks like Phy is a game engine that uses Three under the hood. I don't want to use Three, I want to integrate with a different game engine.