-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
forge2d applyLinearImpulse at first time is not same as next time on android #2750
Comments
Can you share the code to reproduce this? Very odd that it only happens on android |
I found this issue when I create BodyDef set active to false. |
A small example just showing the bug would help a lot in debugging and fixing this 🙂 |
Here is my code:
|
@AzkabanPresident Please add your code to a code block and format it properly, it is close to unreadable now. Code blocks are three backsticks before and after the code. |
I don't know if it's related, but I'm doing something very similar (bowls being pushed by a linear impulse when a drag gesture ends) and yesterday I couldn't get my head around an odd behaviour on the Android emulator. When I checked the game on a physical device, it was OK.
My conclusion is that Reference code: https://github.com/maurovanetti/guidi-tu/blob/main/lib/games/boules/boules_module.dart |
I don't think this is related, since your bodies probably aren't sleeping?
You probably hit the maximum force per tick if the frame rate is dropping too much. |
You're right. They are not.
Oops. I didn't know about this limit, it can explain many such issues. Anyway, it's a different case. |
I update my code , this issue still exists.Now I solve this bug by adding "body.applyForce" in update some frames,but not perfect |
Current bug behavior
when first load forgegame scene,applyLinearImpulse looks like very small even though I set a very large vector2,but next trigger applyLinearImpulse will be ok. This bug is only appeared on android. Other platforms like windows and iOS are ok
Expected behavior
should same result first time and next times
Steps to reproduce
Flutter doctor output
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.10.5, on Microsoft Windows [版本 10.0.19045.3448], locale zh-CN)
• Flutter version 3.10.5 on channel stable at D:\Program Files\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 796c8ef792 (3 months ago), 2023-06-13 15:51:02 -0700
• Engine revision 45f6e00911
• Dart version 3.0.5
• DevTools version 2.23.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at D:\Program Files\Android\Sdk
X cmdline-tools component is missing
Run
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run
flutter doctor --android-licenses
to accept the SDK licenses.See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.3)
• Visual Studio at D:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.6.33801.468
• Windows 10 SDK version 10.0.22000.0
[!] Android Studio (version 2021.2)
• Android Studio at D:\Program Files\AndroidNew\Android Studio
• 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
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] Android Studio (version 2022.1)
• Android Studio at D:\Program Files\Android2022.1.1.21\Android Studio
• 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 11.0.15+0-b2043.56-9505619)
[√] Connected device (4 available)
• SM P610 (mobile) • R52N804CK7J • android-arm64 • Android 10 (API 29)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.19045.3448]
• Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.110
• Edge (web) • edge • web-javascript • Microsoft Edge 117.0.2045.31
[!] Network resources
X A network error occurred while checking "https://github.com/": 信号灯超时时间已到
! Doctor found issues in 3 categories.
More environment information
The text was updated successfully, but these errors were encountered: