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

KinematicCollision.get_local_shape() always returns the KinematicBody's first CollisionShape #31144

Closed
idi0tf0wl opened this issue Aug 6, 2019 · 4 comments · Fixed by #31175

Comments

@idi0tf0wl
Copy link

Godot version:
3.1.1

OS/device including version:
macOS 10.14.5

Issue description:
KinematicCollisions returned by KinematicBody.move_and_collide or get_slide_collision will always return the acting KinematicBody's first CollisionShape as the local_shape, even if that CollisionShape is disabled, sizeless, or otherwise incapable of colliding with anything.

Steps to reproduce:
Create a KinematicBody with two CollisionShapes, disabling the one which is first in the child node hierarchy or, alternatively, arranging them such that only one could collide with your chosen target.

Move the KinematicBody to collide with the target via a method of your choice.

Get the local_shape of the KinematicCollision. It will invariably be the first CollisionShape in the KinematicBody's child node hierarchy.

@Tegu
Copy link
Contributor

Tegu commented Aug 6, 2019

I was able to reproduce the issue with Godot 3.1.1 (and unofficial nightly build 3.2.dev.calinou.fa35a73f0) on 64-bit Windows 10 (version 1903). The attachment has a small test project that demonstrates the problem.

KinematicCollisionLocalShape.zip

@Raphael2048
Copy link
Contributor

GodotPhysic is fine, happens only in bullet physics.

@bojidar-bg
Copy link
Contributor

CC @AndreaCatania

pouleyKetchoupp added a commit to nekomatata/godot that referenced this issue Aug 7, 2019
@akien-mga akien-mga added this to the 3.2 milestone Aug 7, 2019
myhalibobo pushed a commit to myhalibobo/godot that referenced this issue Sep 3, 2019
pchasco pushed a commit to pchasco/godot that referenced this issue Oct 23, 2019
@r0401
Copy link

r0401 commented Sep 29, 2023

This exact issue Appears again in Godot 4 with GodotPhysics, I Tested in Godot 4.0.1.stable and 4.1.stable and both got the same issue

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.

7 participants