-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
RigidBody2D not colliding properly with CollisionShape2D (set to one_way_collision: on) #27593
Comments
The rigid body's shape isn't aligned with body's center of mass, which may or may not be relevant to this issue, also see #12353. |
Thanks for pointing this out @Xrayez . I changed the body's center mass and now the interaction with The The left one goes through a The middle one stops on a The right one stops on a |
Here's the test project with the fixed body's center of mass. test-rigidbody2d-collisions-one-way-fixed-body-center-mass.zip |
I have the same issue: Here is the source: My workaround: [EDIT, much later] |
Fixed with #39880 and cherry-picked for 3.2.3. |
Godot version:
Godot Engine 3.1.stable.official
OS/device including version:
macOs Mojave 10.14.3
Intel Iris Pro 1536 MB
Issue description:
I'm using GLES2.
Scene tree:
The
TileMap
has atileset.tres
Tile Set with a Single Tile withselected_collision_one_way
set toon
. If I turned ifoff
it seems to work.I've also tried using a bunch of
StaticBody2D
withCollisionShape2D
and I get the same behaviour. Whenone_way_collision
ison
theRigidBodyBody2D
doesn't collide properly. But when it'soff
it seems to work fine.The
RigidBodyBody2D
is set toMode: Rigid
. If I change it toMode: Character
seems to work fine with eitherone_way_collision
on and off.Steps to reproduce:
Download the zip and try to play with the
TileMap
and theStaticBody2D
changingone_way_collision
toon/off
. Also try playing with theRigidBodyBody2D
modes.Minimal reproduction project:
test-rigidbody2d-collisions-one-way.zip
UPDATE
Version with the body's center of mass fixed.
test-rigidbody2d-collisions-one-way-fixed-body-center-mass.zip
The text was updated successfully, but these errors were encountered: