Skip to content

Commit

Permalink
fix articulation destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
fbxiang committed Nov 8, 2023
1 parent 6365e83 commit 8c3cf3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/sapien/component/physx/articulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class PhysxArticulation {
mLinks.resize(size, 0);
}

std::shared_ptr<PhysxEngine> mEngine;

physx::PxArticulationReducedCoordinate *mPxArticulation{};
physx::PxArticulationCache *mCache{};

Expand Down
2 changes: 1 addition & 1 deletion python/py_package/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ __all__ = [

def set_log_level(level: str) -> None:
pass
__version__ = '3.0.0.dev20231107'
__version__ = '3.0.0.dev20231108'
SceneConfig = sapien.pysapien.physx.PhysxSceneConfig
1 change: 1 addition & 0 deletions src/component/physx/articulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ shared_link(PhysxArticulationLinkComponent *link) {
}

PhysxArticulation::PhysxArticulation() {
mEngine = PhysxEngine::Get();
mPxArticulation = PhysxEngine::Get()->getPxPhysics()->createArticulationReducedCoordinate();
mPxArticulation->setArticulationFlag(PxArticulationFlag::eDRIVE_LIMITS_ARE_FORCES, true);
}
Expand Down

0 comments on commit 8c3cf3b

Please sign in to comment.