Be able to get contact result of trigger entity
Currently it's not possible to get the contact result of a trigger entity, while Ammo provides this information. It will be nice if I can access this information with a trigger entity. (I want to use a trigger entity on a AI to detect all entities in the surrounding and with the (local) position of the collision points I can let the AI make the right decisions).
https://github.com/playcanvas/engine/blob/58ef2f524a2058467631e7722beee92caf2b8231/src/framework/components/rigid-body/system.js#L835C19-L835C30
Hi @MushAsterion!
I know you've done some raycast upgrades in the past. First of all, thanks for that! Maybe you can help me with this as well?
Please see also my other related request: https://github.com/playcanvas/engine/issues/5669
Thank you in advance.
Hey @albertvanveen, from what I see the trigger event was purposefully created without detailed payload back in 2013 while other collision events already had all contacts details so it may be nice to have more history from the Playcanvas team to know the reasoning
Unfortunately, I don't know who is responsible for the physics of the engine. I hope @willeastcott can answer this question.
Do you think adding this feature will have breaking changes?
To me the best integration would be to replace make the event's arg0 be a ContactResult for consistency with collisionstart and contact events which would be a breaking change.
Only adding 'contact' for trigger entities without changing the other events (to prevent breaking changes) is no option?
Would still be breaking for people relying on contact event firing for certain body combination and doesn't fix the root issue with triggerenter not being consistent with similar events
We would need to avoid breaking changes unless it is the only necessary option. As engine "promises" to not break existing projects. If there is a path of no-breaking change - please consider it.