JoltPhysics3D: Rework RigidBody wrapper
- Add a clear way to setup dynamic/kinematic or static bodies - Body registration to the world is batched (all bodies created before a physics step are added together, which is what Jolt is optimized for) - Added support for empty shapes (= rigid bodies without collision) using a very small shape and tagging the body as sensor
This commit is contained in:
committed by
Jérôme Leclercq
parent
67b1710adb
commit
d610baf920
@@ -6,6 +6,11 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline void JoltRigidBody3D::DisableSimulation()
|
||||
{
|
||||
return EnableSimulation(false);
|
||||
}
|
||||
|
||||
inline void JoltRigidBody3D::DisableSleeping()
|
||||
{
|
||||
return EnableSleeping(false);
|
||||
@@ -31,9 +36,14 @@ namespace Nz
|
||||
return m_geom;
|
||||
}
|
||||
|
||||
inline JoltPhysWorld3D* JoltRigidBody3D::GetWorld() const
|
||||
inline JoltPhysWorld3D& JoltRigidBody3D::GetWorld() const
|
||||
{
|
||||
return m_world;
|
||||
return *m_world;
|
||||
}
|
||||
|
||||
inline bool JoltRigidBody3D::IsSimulationEnabled() const
|
||||
{
|
||||
return m_isSimulationEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user