flame-engine / flame-engine/flame

forge2d applyLinearImpulse at first time is not same as next time on android

Open
#2,750 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dart
Stars
10.8k
Forks
1k
Avg merge
1d 20h
Merged PRs (30d)
21

Description

# 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

```
Output of: flutter doctor -v
```
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

* Flame version: ^1.8.2
* flame_forge2d: ^0.14.1+1
* Platform affected: android,
* Platform version affected: android 13,android 10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.