Open fatbatman opened 1 year ago
Are there any work arounds for this?
yep i will make demo about that and standardize the process for all engine
Actually, for me Havok worker "Character" example never calls any trigger. You can verify this by adding console logs to showContact
and triggerContact
and switching between PhysX and Havok.
By the way, I actually want to get a list of all items that are colliding with a given mesh. Any idea the best way to do that?
Sorry to pile on, but I also noticed both the point
and normal arrays
on a hit are always [0,0,0]
as well.
What's the recommended way to access the underlying physics engine so I can register a contact listeners directly as a workaround for now?
contact is add to havok trigger is not constant ? i search why collision return need more research but is in good way
It work better In the latest version with Havok - arg.hit is set correctly
I noticed b1, b2 must be in a specific order though
phy.add({ type:'contact', b1:'box1', b2:'sensor1', callback: trigContact}) //is called and arg.hit is set correctly phy.add({ type:'contact', b1:'box2', b2:'sensor1', callback: trigContact}) //is called and arg.hit is set correctly
//This behaves differently: phy.add({ type:'contact', b1:'sensor1', b2:'box1', callback: trigContact}) //is called and arg.hit is set correctly phy.add({ type:'contact', b1:'sensor1', b2:'box2', callback: trigContact}) //# IS NEVER CALLED #
contact point and normal information still isn't present.
Some way of register for all contacts of a given object using a wildcard would be useful.
Using Havok contact events don't get triggered after registering more than about ~146.
This in a scene with about 160 rigid bodies in total.
mm ok i can increase contact
Is it possible to have wildcard for all contacts from an objects?
as currently I have to register an object, e.g. a bullet, against all possible targets.
Also an ability to remove the contact.
problem is with worker i have to limite message and return array i will think about that
I see you increased the number of contacts that can be supported.
This means it lasts longer, but then runs out as old ones never get cleaned up.
However, I can remove the contacts based on their name, but it means I need to store a mapping of those contact pairs relevant to each body.
phy.add({ type:'contact', b1:obj1.name, b2:'obj2.name, callback: someCallback })
In Havok someCallback is called for all collisions involving obj1, not just those involving obj2 but arg.hit is always false.
Phsyx works as expected
Rapier, seems to always have arg.hit == true
Also, including all details of the contact in the collision callback argument is probably needed in most real world uses - body1, body2, position, velocity etc