We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rect2.intersects
it seems that it doesn't match the Godot code logic:
https://github.com/godot-rust/godot-rust/blob/e131df29c3ccd9d1ea733d25d5e621f6df2e2817/gdnative-core/src/core_types/geom/rect2.rs#L114-L118
vs
if (position.x >= (p_rect.position.x + p_rect.size.width)) { return false; } if ((position.x + size.width) <= p_rect.position.x) { return false; } if (position.y >= (p_rect.position.y + p_rect.size.height)) { return false; } if ((position.y + size.height) <= p_rect.position.y) { return false; }
The last line of Rust should be
&& self.position.y + self.size.y > b.position.y
Rect2.intersects_including_borders has the same error as well.
Rect2.intersects_including_borders
The text was updated successfully, but these errors were encountered:
Merge #948
b3b548e
948: fix(rect2): match Rect2.intersects with Godot logic r=Bromeon a=Shou Fixes #947 Co-authored-by: Shou <x+g@shou.io>
5a5a62d
Successfully merging a pull request may close this issue.
it seems that it doesn't match the Godot code logic:
https://github.com/godot-rust/godot-rust/blob/e131df29c3ccd9d1ea733d25d5e621f6df2e2817/gdnative-core/src/core_types/geom/rect2.rs#L114-L118
vs
The last line of Rust should be
Rect2.intersects_including_borders
has the same error as well.The text was updated successfully, but these errors were encountered: