According to docs, we can detect the point of collision between two physical bodies.
In fact, the point
is always undefined: PG.
I really need that point (particularly in collidedAgainst.object
local coordinates).
According to docs, we can detect the point of collision between two physical bodies.
In fact, the point
is always undefined: PG.
I really need that point (particularly in collidedAgainst.object
local coordinates).
cc @Cedric our physix GURU
This is only available with AmmoJS
So sad. Is there any other way to get the collision point?
that’s something I want to improve with V2 physics plugin. It will take a few months before getting there.
I think I found a workaround. Collision point can be extracted from collider.object.position
.
So, the full solution in local coordinates of target can look like this:
const impactPoint = point || collider.object.position;
const localImpactPoint = impactPoint.subtract(collidedAgainst.object.position);