From 836b1d2d94d6b34253b80add4fbbf324aa50189d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9A=B0=EC=A0=9C=EC=9C=A8/Jae=20Yul=20Woo?= Date: Wed, 23 Aug 2023 15:09:20 +0900 Subject: [PATCH 1/2] Fix typo on 'programming/physics/bullet/collision-filtering.rst' --- programming/physics/bullet/collision-filtering.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programming/physics/bullet/collision-filtering.rst b/programming/physics/bullet/collision-filtering.rst index 10552481..e548e95b 100644 --- a/programming/physics/bullet/collision-filtering.rst +++ b/programming/physics/bullet/collision-filtering.rst @@ -137,14 +137,14 @@ collision groups the object belongs to. .. code-block:: python - shape = shape = BulletBoxShape(Vec3(0.5, 0.5, 0.5)) + shape = BulletBoxShape(Vec3(0.5, 0.5, 0.5)) body = BulletRigidBodyNode('Body') body.addShape(shape) world.attachRigidBody(body) - bodyNP = self.worldNP.attachNewNode(body) + bodyNP = render.attachNewNode(body) bodyNP.setPos(0, 0, -1) # Set it to be a part of group 0 @@ -174,7 +174,7 @@ following line is an alternate way to set the collide mask: .. code-block:: python - bodyNP.node().setIntoCollideMask(mask) + bodyNP.setIntoCollideMask(mask) .. only:: cpp From 7d196b4dfb89644ac38c9e22aac7293e174a2ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9A=B0=EC=A0=9C=EC=9C=A8/Jae=20Yul=20Woo?= Date: Wed, 23 Aug 2023 16:35:11 +0900 Subject: [PATCH 2/2] Fix typo on 'programming/physics/bullet/queries.rst' --- programming/physics/bullet/queries.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programming/physics/bullet/queries.rst b/programming/physics/bullet/queries.rst index c86b48c1..a5fa2366 100644 --- a/programming/physics/bullet/queries.rst +++ b/programming/physics/bullet/queries.rst @@ -129,7 +129,7 @@ instead of a BulletTriangleMeshShape.) shape = BulletSphereShape(0.5) penetration = 0.0 - result = world.sweepTestClosest(shape, tsFrom, tsTo, penetration) + result = world.sweepTestClosest(shape, tsFrom, tsTo, BitMask32.allOn(), penetration) print(result.hasHit()) print(result.getHitPos())