Skip to content

Commit 79c9f4f

Browse files
committed
bugfix: assertion failure in JoltPhysicsObject.java
1 parent dc09975 commit 79c9f4f

File tree

1 file changed

+3
-2
lines changed
  • src/main/java/com/github/stephengold/joltjni

1 file changed

+3
-2
lines changed

src/main/java/com/github/stephengold/joltjni/Body.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,11 @@ public MotionProperties getMotionProperties() {
232232
result = null;
233233
} else {
234234
long propertiesVa = getMotionProperties(bodyVa);
235+
JoltPhysicsObject container = getContainingObject();
235236
if (isSoftBody(bodyVa)) {
236-
result = new SoftBodyMotionProperties(this, propertiesVa);
237+
result = new SoftBodyMotionProperties(container, propertiesVa);
237238
} else {
238-
result = new MotionProperties(this, propertiesVa);
239+
result = new MotionProperties(container, propertiesVa);
239240
}
240241
}
241242

0 commit comments

Comments
 (0)