File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ class Body {
117117 // / Set whether or not the body is active
118118 virtual void setIsActive (bool isActive);
119119
120+ virtual void setIsSleeping (bool isSleeping) {};
121+
120122 // / Return the current position and orientation
121123 const Transform& getTransform () const ;
122124
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ class RigidBody : public Body {
145145 void enableGravity (bool isEnabled);
146146
147147 // / Set the variable to know whether or not the body is sleeping
148- void setIsSleeping (bool isSleeping);
148+ void setIsSleeping (bool isSleeping) override ;
149149
150150 // / Return the linear velocity damping factor
151151 decimal getLinearDamping () const ;
Original file line number Diff line number Diff line change 3333#include < cstring>
3434#include < iterator>
3535#include < memory>
36+ #include < vector>
3637
3738namespace reactphysics3d {
3839
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class DefaultAllocator : public MemoryAllocator {
7777 virtual void release (void * pointer, size_t /* size*/ ) override {
7878
7979 // If compiler is Visual Studio
80- #ifdef RP3D_COMPILER_VISUAL_STUDIO
80+ #ifdef RP3D_PLATFORM_WINDOWS
8181
8282 // Visual Studio doesn't not support standard std:aligned_alloc() method from c++ 17
8383 return _aligned_free (pointer);
Original file line number Diff line number Diff line change @@ -111,10 +111,7 @@ void Collider::setLocalToBodyTransform(const Transform& transform) {
111111 const Transform& bodyTransform = mBody ->mWorld .mTransformComponents .getTransform (mBody ->getEntity ());
112112 mBody ->mWorld .mCollidersComponents .setLocalToWorldTransform (mEntity , bodyTransform * transform);
113113
114- RigidBody* rigidBody = dynamic_cast <RigidBody*>(mBody );
115- if (rigidBody != nullptr ) {
116- rigidBody->setIsSleeping (false );
117- }
114+ mBody ->setIsSleeping (false );
118115
119116 mBody ->mWorld .mCollisionDetection .updateCollider (mEntity );
120117
You can’t perform that action at this time.
0 commit comments