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

Polygon2D-Circle overlapping is inaccurate #14379

Closed
tuket opened this issue Dec 7, 2017 · 2 comments
Closed

Polygon2D-Circle overlapping is inaccurate #14379

tuket opened this issue Dec 7, 2017 · 2 comments

Comments

@tuket
Copy link

tuket commented Dec 7, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10. Godot 2.1.4.stable.

Issue description:

Poligon2D-Circle overlapping is inaccurate.

Steps to reproduce:
I create a CollisionPolygon2D and a CircleShape2D.
For the circle I create a script that changes the color when overlaps with something.

func _process(delta):
	var num = get_node("Area2D").get_overlapping_bodies().size()
	if num > 0:
		get_material().set_shader_param("col", Color(0, 1, 0))

You can see in the following gif what I mean with inaccurate

2017-12-07_15-16-39

Link to minimal example project:

godot.zip

@akien-mga akien-mga changed the title Poligon2D-Circle overlapping is inaccurate Polygon2D-Circle overlapping is inaccurate Dec 7, 2017
@groud groud added this to the 2.1 milestone Dec 7, 2017
@liorda
Copy link

liorda commented Dec 10, 2017

It looks like you have a scale factor on Sprite, which in editor looks like a scale on the (child) collision shape, but that scale is reset in runtime. Duplicate of #7375. @akien-mga I suggest closing this.

@akien-mga
Copy link
Member

That's indeed a duplicate of #7375 and #5734.

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

No branches or pull requests

4 participants