use ContinuousConvexCollision for raycaster, fixes raycast problems
This commit is contained in:
parent
a26ef58877
commit
d1c0a4e6d1
@ -27,6 +27,7 @@
|
||||
#include "NarrowPhaseCollision/VoronoiSimplexSolver.h"
|
||||
#include "NarrowPhaseCollision/SubSimplexConvexCast.h"
|
||||
#include "NarrowPhaseCollision/GjkConvexCast.h"
|
||||
#include "NarrowPhaseCollision/ContinuousConvexCollision.h"
|
||||
|
||||
|
||||
#include "CollisionDispatch/CollisionDispatcher.h"
|
||||
@ -1299,8 +1300,9 @@ PHY_IPhysicsController* CcdPhysicsEnvironment::rayTest(PHY_IPhysicsController* i
|
||||
|
||||
ConvexShape* convexShape = (ConvexShape*) body->GetCollisionShape();
|
||||
VoronoiSimplexSolver simplexSolver;
|
||||
SubsimplexConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
//SubsimplexConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
//GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
|
||||
|
||||
if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,body->getCenterOfMassTransform(),body->getCenterOfMassTransform(),rayResult))
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "NarrowPhaseCollision/VoronoiSimplexSolver.h"
|
||||
#include "NarrowPhaseCollision/SubSimplexConvexCast.h"
|
||||
#include "NarrowPhaseCollision/GjkConvexCast.h"
|
||||
#include "NarrowPhaseCollision/ContinuousConvexCollision.h"
|
||||
|
||||
|
||||
#include "CollisionDispatch/CollisionDispatcher.h"
|
||||
@ -1299,8 +1300,9 @@ PHY_IPhysicsController* CcdPhysicsEnvironment::rayTest(PHY_IPhysicsController* i
|
||||
|
||||
ConvexShape* convexShape = (ConvexShape*) body->GetCollisionShape();
|
||||
VoronoiSimplexSolver simplexSolver;
|
||||
SubsimplexConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
//SubsimplexConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
//GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
|
||||
ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
|
||||
|
||||
if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,body->getCenterOfMassTransform(),body->getCenterOfMassTransform(),rayResult))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user