isColliding
is giving inconsistent results when adding/removing Hitboxes per update
#3417
Labels
isColliding
is giving inconsistent results when adding/removing Hitboxes per update
#3417
What happened?
I'm not getting consistent results from the collision detection. Sometimes things are colliding, sometimes they are not.
What do you expect?
When using the arrow keys to move the circle through the red area full of colliders I would expect that it would refuse to enter it because
this.isColliding == true
. Instead it just seems to stutter, sometimes failing to move, sometimes not.How can we reproduce this?
In this example, on one update a collider is added that represents where the component will move. If it doesn't collide it will actually execute the move on the next update. Then the hitbox is removed and a new one is added which represents the next move.
I attempted removing the hitbox if there is a collision instead of using
isColliding
and I got the same results.What steps should take to fix this?
No response
Do have an example of where the bug occurs?
Relevant log output
Notice that there is a collision happening, but the "move" command is still printed out afterwards.
[!] Flutter (Channel [user-branch], 3.27.0-1.0.pre.644, on macOS 14.7.1 23H222 darwin-arm64, locale en)
! Flutter version 3.27.0-1.0.pre.644 on channel [user-branch] at /Users/aaclarke/dev/flutter
Currently on an unknown channel. Run
flutter channel
to switch to an official channel.If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision f3f72ede04 (3 weeks ago), 2024-11-25 16:14:30 -0800
• Engine revision fe45a66086
• Dart version 3.7.0 (build 3.7.0-183.0.dev)
• DevTools version 2.41.0-dev.2
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and
upgrades.
The text was updated successfully, but these errors were encountered: