Fix T37673: Ray casting could fail with 0 collision margins
Use bullet's old method of doing ray casts to stay compatible with old files. It's faster but a bit less accurate.
This commit is contained in:
parent
8fa4517a20
commit
6fe5b3be38
Notes:
blender-bot
2023-02-14 11:32:13 +01:00
Referenced by issue #37673, Another regression between 2.69 and current (related to rayCast)
|
@ -31,6 +31,7 @@ subject to the following restrictions:
|
|||
#include "BulletSoftBody/btSoftRigidDynamicsWorld.h"
|
||||
#include "BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h"
|
||||
#include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h"
|
||||
#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
|
||||
|
||||
//profiling/timings
|
||||
#include "LinearMath/btQuickprof.h"
|
||||
|
@ -1131,6 +1132,8 @@ PHY_IPhysicsController* CcdPhysicsEnvironment::RayTest(PHY_IRayCastFilterCallbac
|
|||
|
||||
// don't collision with sensor object
|
||||
rayCallback.m_collisionFilterMask = CcdConstructionInfo::AllFilter ^ CcdConstructionInfo::SensorFilter;
|
||||
// use faster (less accurate) ray callback, works better with 0 collision margins
|
||||
rayCallback.m_flags |= btTriangleRaycastCallback::kF_UseSubSimplexConvexCastRaytest;
|
||||
//, ,filterCallback.m_faceNormal);
|
||||
|
||||
m_dynamicsWorld->rayTest(rayFrom,rayTo,rayCallback);
|
||||
|
|
Loading…
Reference in New Issue