Skip to content
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

Rotation/Scale/Translation mixes on CollisionShapes not consistently resulting in correct collision #41685

Closed
Tracked by #45334 ...
SgtLion opened this issue Sep 1, 2020 · 3 comments · Fixed by #67847
Closed
Tracked by #45334 ...

Comments

@SgtLion
Copy link

SgtLion commented Sep 1, 2020

Godot version:
v3.2.2.stable.official

OS/device including version:
Windows 10 - v1909

Issue description:
When creating levels with a number of Bodies with CollisionShapes, I simply noticed that the Player KinematicBody could walk through certain shapes as if one of their scales was very far wrong (i.e. shape mostly walk-throughable, but middle section still colliding).

Steps to reproduce:
Create a few StaticBodies (Or KinematicBodies/anyBodies), add a CollisionShape, add some rotations to the CollisionShapes (in my case, a couple of 90degrees on the x-axis), and play around with Scale in both the StaticBody node and the CollisionShape node, you'll very soon find a mix where collision is not happening properly.

I can't work out the pattern of issue here, but I think it has something to do with rotating/translating/scaling the Shape such that one of those operations isn't be applied on the correct axis for the real collision shape.

Minimal reproduction project:
Walk into the small box, you will see correct, expected collision between player and box. Walk into the big box, and you will be able to walk all the way to middle as if its Z-Scale was like, 0.001. The only difference between these boxes are the transforms on them and their StaticBody parent.
HuntDownTheWall.zip

@Calinou
Copy link
Member

Calinou commented Sep 1, 2020

You shouldn't scale CollisionShapes, especially in a non-uniform manner. The editor should warn you about this already – see also #32975.

@SgtLion
Copy link
Author

SgtLion commented Sep 2, 2020

That would make sense, resetting the transforms on the collisionShapes seems to resolve the issue. Odd still, then I guess the bug report is perhaps simply that I'm not being given that warning.

@aaronfranke
Copy link
Member

Likely related to #5734.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants