You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RaycastResult has a field called isInsideHitbox. The documentation explains: Whether the origin of the ray was inside the hitbox.
I tried it with PolygonHitbox, RectangleHitbox and CircleHitbox: I spread several random rays over the screen and marked the position of the origin of the ray with a colored circle when it collided with the hitbox. The inner origins should be red, the outer origins green.
With RectangleHitbox and PolygonHitbox the results were as expected, but not with CircleHitbox: Some of the outside points were evaluated as inside points by the isInsideHitbox field.
Some of the outside points are red, but they should all be green:
All outside points are green for RectangleHitbox and PolygonHitbox, as expected:
What do you expect?
isInsideHitbox should be evaluate as false, when the origin of the ray was outside the hitbox.
[✓] VS Code (version 1.87.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.84.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.2.1 23C71 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.94
! Error: Browsing on the local area network for iPad von Andreas. Ensure the
device is unlocked and attached with a cable or associated with the same
local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources
• All expected network resources are available.
• No issues found!
Affected platforms
All
Other information
No response
Are you interested in working on a PR for this?
I want to work on this
The text was updated successfully, but these errors were encountered:
Thanks for the absolutely terrific MRE! The issue is now solved in in #3100.
I took your MRE and added it to the examples directory, I hope you don't mind. :)
Previously some rays that originated outside of the `CircleHitbox` were
counted as inside, this solves that and adds an example of how to use
the `isInsideHitbox` functionality (thanks to @wurzelsand).
Closes#3063
What happened?
RaycastResult has a field called
isInsideHitbox
. The documentation explains: Whether the origin of the ray was inside the hitbox.I tried it with PolygonHitbox, RectangleHitbox and CircleHitbox: I spread several random rays over the screen and marked the position of the origin of the ray with a colored circle when it collided with the hitbox. The inner origins should be red, the outer origins green.
With RectangleHitbox and PolygonHitbox the results were as expected, but not with CircleHitbox: Some of the outside points were evaluated as inside points by the
isInsideHitbox
field.Some of the outside points are red, but they should all be green:
All outside points are green for RectangleHitbox and PolygonHitbox, as expected:
What do you expect?
isInsideHitbox
should be evaluate as false, when the origin of the ray was outside the hitbox.How can we reproduce this?
This is how I made the tests:
What steps should take to fix this?
No response
Do have an example of where the bug occurs?
No response
Relevant log output
No response
Execute in a terminal and put output into the code block below
[✓] Flutter (Channel stable, 3.19.2, on macOS 14.2.1 23C71 darwin-x64, locale
en-US)
• Flutter version 3.19.2 on channel stable at /Users/user/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7482962148 (4 days ago), 2024-02-27 16:51:22 -0500
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.14.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.87.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.84.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 14.2.1 23C71 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.94
! Error: Browsing on the local area network for iPad von Andreas. Ensure the
device is unlocked and attached with a cable or associated with the same
local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources
• All expected network resources are available.
• No issues found!
Affected platforms
All
Other information
No response
Are you interested in working on a PR for this?
The text was updated successfully, but these errors were encountered: