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

Kinematics body regression when using raycast collision shapes. #42462

Closed
HungryProton opened this issue Oct 1, 2020 · 3 comments · Fixed by #42500
Closed

Kinematics body regression when using raycast collision shapes. #42462

HungryProton opened this issue Oct 1, 2020 · 3 comments · Fixed by #42500

Comments

@HungryProton
Copy link
Contributor

HungryProton commented Oct 1, 2020

Godot version:
3.2.git
Commit causing the regression : a9b5dc5

OS/device including version:
Ubuntu 20.04

Issue description:
When using Bullet, kinematics body ignores the ray collision shapes when using move_and_slide.
Using move_and_collide makes it collide at the beginning of the ray instead of the end.

Steps to reproduce:

  • Create a kinematic body with a ray collision shape
  • Move it towards another physic body with move_and_collide: The collision happens at the wrong end
  • Move it with move_and_slide: The collision is ignored.

Minimal reproduction project:
minimal_project.zip

Motion happens in the gravity.gd script.

@akien-mga
Copy link
Member

Commit causing the regression : a9b5dc5

That's the cherry-pick for #41426, CC @madmiraal @AndreaCatania.

@HungryProton
Copy link
Contributor Author

In the minimal project I sent, the collision shape is rotated. I used the 3D gizmo to make it point downwards and the transform matrix looks like this:
image

But! If I click the revert icon and manually type 90° in the x axis rotation, the transform matrix is slightly different:
image

(Notice the -0 instead of 0)
I have no idea why it makes a difference but the collision happens properly in this case.

@madmiraal
Copy link
Contributor

Fixed with #42500.

Interestingly, -0 should have caused it to fail (flip the RayCast) too, but Bullet didn't think that it was close enough to zero. 😕 So maybe something to look into too.

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Oct 2, 2020
@akien-mga akien-mga changed the title [3.2] Kinematics body regression when using raycast collision shapes. Kinematics body regression when using raycast collision shapes. Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants