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

Bad collision against StaticBody2D with LineShape2D #7920

Closed
eon-s opened this issue Mar 2, 2017 · 12 comments · Fixed by #42532
Closed

Bad collision against StaticBody2D with LineShape2D #7920

eon-s opened this issue Mar 2, 2017 · 12 comments · Fixed by #42532
Assignees
Milestone

Comments

@eon-s
Copy link
Contributor

eon-s commented Mar 2, 2017

Ubuntu 16.10 - Godot 2.1.2 stable

Issue description:
A StaticBody2D with a LineShape2D get incorrect collision against other bodies (or bodies against the static line).

It was expected to get collisions checked against full shapes, not just the "lower" part.

Steps to reproduce:

  • Create a StaticBody2D with a horizontal LineShape2D, like a floor.
  • Create a RigidBody2D with a CircleShape2D over the line, rotate it a bit.
  • Look how the RigidBody2D hangs below the line.

Happens with other shapes against a line.

lineshapebug

Link to minimal example project:
StaticLineBug.zip

@bojidar-bg
Copy link
Contributor

Are you sure it isn't a feature? 😉

@RebelliousX
Copy link
Contributor

@bojidar-bg I was thinking the same way. That dangling Godot is priceless lol.

@eon-s
Copy link
Contributor Author

eon-s commented Nov 13, 2017

Affects master too.

Project for Godot 3:
StaticLineBugV3.zip

@kubecz3k
Copy link
Contributor

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

@eon-s
Copy link
Contributor Author

eon-s commented Apr 10, 2018

Still valid for 3.0.2 or current master.

@MutantOctopus
Copy link

Not sure if related, but a KinematicBody2D that moves toward a nonmoving StaticBody2D with a LineShape2D hitbox will "jiggle" as if it's constantly entering the LineShape2D and being pushed back out. This problem doesn't happen with any other type of hitbox.

To be fair, the docs recommend against using LineShape2Ds on a StaticBody2D, apparently for performance issues, but it's still weird, unintuitive behavior.

@eon-s
Copy link
Contributor Author

eon-s commented Jun 25, 2018

@MutantOctopus you mean this #9332?

@MutantOctopus
Copy link

Maybe, but not exactly. In my own experience I've had no problems with moving away from the line - but so long as you hold toward the line, the KB keeps jittering as if it keeps getting pushed away. It's probably related.

@eon-s
Copy link
Contributor Author

eon-s commented Jul 3, 2018

I would like confirmation if this is a bug or a feature (like with Plane), in the case of being the intended behavior this will need to be documented.

@reduz
Copy link
Member

reduz commented Nov 2, 2018

LineShape2D will most likely be removed in 3.2/4.0 due to difficulty in using it with other phyisc engine and everything in general.

@Xrayez
Copy link
Contributor

Xrayez commented Oct 3, 2020

I would like confirmation if this is a bug or a feature (like with Plane), in the case of being the intended behavior this will need to be documented.

I confirm I've stumbled upon this some time ago in 3.2, that's why I don't use this currently. 😕

#42532 is there to fix this.

@capnm
Copy link
Contributor

capnm commented Oct 3, 2020

#42532 is there to fix this.

Indeed the patch fixes it. It took over 3 years to wait for a single line of code.
(We know why it's called Godot ;-)

grafik

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