Skip to content

Commit

Permalink
phys: use UseGjkConvexCastRaytest for Bullet3 raycar (was default for…
Browse files Browse the repository at this point in the history
… Bullet 2.82)
  • Loading branch information
NicSavichev committed Jan 31, 2024
1 parent e64f407 commit 3a8d1e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prog/engine/phys/physBullet/bulletRayCar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <debug/dag_debug.h>
#include <debug/dag_log.h>
#include <workCycle/dag_workCyclePerf.h>
#if BT_BULLET_VERSION >= 325
#include <BulletCollision/NarrowPhaseCollision/btRaycastCallback.h>
#endif

#define U_EPSILON 1e-6
const btVector3 gravity(0, -9.8, 0);
Expand Down Expand Up @@ -83,6 +86,9 @@ void BulletRbRayCar::Wheel::addRayQuery(float ifps)

btVector3 p0 = spring_fixpt, p1 = spring_fixpt + wSpringAxis * hit.distance;
RayCastCallback resultCallback(p0, p1, body, wheel);
#if BT_BULLET_VERSION >= 325
resultCallback.m_flags |= btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest;
#endif
physWorld->getScene()->rayTest(p0, p1, resultCallback);
if (resultCallback.hasHit())
{
Expand Down

0 comments on commit 3a8d1e6

Please sign in to comment.