Use the kF_UseGjkConvexCastRaytest for more accurate picking

fix upAxis in some demos
This commit is contained in:
erwincoumans
2018-10-27 11:38:38 -07:00
parent a44df2b0a6
commit bdda7af8d7
4 changed files with 6 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
#include "CommonGraphicsAppInterface.h"
#include "CommonWindowInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
struct CommonRigidBodyBase : public CommonExampleInterface
{
@@ -317,6 +318,7 @@ struct CommonRigidBodyBase : public CommonExampleInterface
btCollisionWorld::ClosestRayResultCallback rayCallback(rayFromWorld, rayToWorld);
rayCallback.m_flags |= btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest;
m_dynamicsWorld->rayTest(rayFromWorld, rayToWorld, rayCallback);
if (rayCallback.hasHit())
{