Added recastnavigation support
This commit is contained in:
@@ -572,6 +572,8 @@ public:
|
||||
, job_system(JPH::cMaxPhysicsJobs, JPH::cMaxPhysicsBarriers,
|
||||
std::thread::hardware_concurrency() - 1)
|
||||
, mDebugRenderer(new DebugRenderer(scnMgr, cameraNode))
|
||||
, object_vs_broadphase_layer_filter{}
|
||||
, object_vs_object_layer_filter{}
|
||||
, debugDraw(false)
|
||||
{
|
||||
// Create a factory, this class is responsible for creating instances of classes based on their name or hash and is mainly used for deserialization of saved data.
|
||||
@@ -585,7 +587,7 @@ public:
|
||||
|
||||
// This is the max amount of rigid bodies that you can add to the physics system. If you try to add more you'll get an error.
|
||||
// Note: This value is low because this is a simple test. For a real project use something in the order of 65536.
|
||||
const uint cMaxBodies = 1024;
|
||||
const uint cMaxBodies = 65536;
|
||||
|
||||
// This determines how many mutexes to allocate to protect rigid bodies from concurrent access. Set it to 0 for the default settings.
|
||||
const uint cNumBodyMutexes = 0;
|
||||
@@ -594,12 +596,12 @@ public:
|
||||
// body pairs based on their bounding boxes and will insert them into a queue for the narrowphase). If you make this buffer
|
||||
// too small the queue will fill up and the broad phase jobs will start to do narrow phase work. This is slightly less efficient.
|
||||
// Note: This value is low because this is a simple test. For a real project use something in the order of 65536.
|
||||
const uint cMaxBodyPairs = 1024;
|
||||
const uint cMaxBodyPairs = 65536;
|
||||
|
||||
// This is the maximum size of the contact constraint buffer. If more contacts (collisions between bodies) are detected than this
|
||||
// number then these contacts will be ignored and bodies will start interpenetrating / fall through the world.
|
||||
// Note: This value is low because this is a simple test. For a real project use something in the order of 10240.
|
||||
const uint cMaxContactConstraints = 1024;
|
||||
const uint cMaxContactConstraints = 10240;
|
||||
|
||||
// Now we can create the actual physics system.
|
||||
physics_system.Init(cMaxBodies, cNumBodyMutexes, cMaxBodyPairs,
|
||||
|
||||
Reference in New Issue
Block a user