Cedric
June 19, 2020, 3:51pm
21
I see, try to find a penetration
value in the callback parameter.
11116
June 19, 2020, 4:07pm
22
Is there anything other than an id of an object?
11116
June 19, 2020, 4:20pm
23
I was prompted by such a solution: to find the vector from the central axis of the person to the point of collision, normalize and multiply by the vector of the vehicle’s impulse, get the momentum from the push, if the value is below a threshold, ignored.
Maybe you know a way to find a vector from the central axis to the point of collision?
Cedric
June 23, 2020, 12:09pm
24
In the btManifoldPoint, there is a distance you can get. I guess it’s the penetration distance.
[Value] attribute btConstCollisionObjectArray m_collisionObjects;
[Value] attribute btVector3 m_rayFromWorld;
[Value] attribute btVector3 m_rayToWorld;
[Value] attribute btVector3Array m_hitNormalWorld;
[Value] attribute btVector3Array m_hitPointWorld;
[Value] attribute btScalarArray m_hitFractions;
};
AllHitsRayResultCallback implements RayResultCallback;
interface btManifoldPoint {
[Const, Ref] btVector3 getPositionWorldOnA();
[Const, Ref] btVector3 getPositionWorldOnB();
[Const] double getAppliedImpulse();
[Const] double getDistance();
[Value] attribute btVector3 m_localPointA;
[Value] attribute btVector3 m_localPointB;
[Value] attribute btVector3 m_positionWorldOnB;
[Value] attribute btVector3 m_positionWorldOnA;
[Value] attribute btVector3 m_normalWorldOnB;