support relative setPosition, add hardware keyboard listener + control, log FPS

This commit is contained in:
Nick Fisher
2024-02-03 11:55:44 +08:00
parent 0d9cf8a9ff
commit 63a52025dd
11 changed files with 238 additions and 26 deletions

View File

@@ -470,9 +470,9 @@ extern "C"
((AssetManager *)assetManager)->transformToUnitCube(asset);
}
FLUTTER_PLUGIN_EXPORT void set_position(void *assetManager, EntityId asset, float x, float y, float z)
FLUTTER_PLUGIN_EXPORT void set_position(void *assetManager, EntityId asset, float x, float y, float z, bool relative)
{
((AssetManager *)assetManager)->setPosition(asset, x, y, z);
((AssetManager *)assetManager)->setPosition(asset, x, y, z, relative);
}
FLUTTER_PLUGIN_EXPORT void set_rotation(void *assetManager, EntityId asset, float rads, float x, float y, float z)