Skip to content

Fix typo on 'programming/physics/bullet/collision-filtering.rst' #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions programming/physics/bullet/collision-filtering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion programming/physics/bullet/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down