Open leoduckcd opened 3 years ago
Remote gltf works fine.
use ArCoreReferenceNode
and the objectUrl
parameter to your gltf file.
How could I store the .gltf file locally?
maybe try a local http server like https://pub.dev/packages/local_assets_server let me know if you get it working.
I also use a local server. Can't you save the .gltf file as an asset and use this path?
Here is my solution for local files: Frame.glb is stored in the Flutter App und assets/Frame.glb and it is also declared in pubspec.yaml
2.nd : String objectName= 'Frame.glb'; String pathToObject; await for (var entity in Directory.systemTemp.list(recursive: true, followLinks: false)) { if (entity.path.endsWith(objectName)){ print(entity.path); pathToObject=entity.path; } }
infoNode = ArCoreReferenceNode( name: "Frame", objectUrl: pathToObject, );
@wiizarrrd it seems like you have the solution. can you please send a screenshot of your chunk of code here? i tried with your solution above but i cant make it work.
@KennyChan94P this is my code. However it is a very bad workaround as it works via searching in the whole system folder for the object.
Since the Sceneform plugin is no longer supported in Android Studio and you therefore cannot convert a 3D-object into a .sbf file, is there any possibility that you could use a .gltf or .obj object instead? There is a Maintained Sceneform SDK for Android (https://github.com/ThomasGorisse/sceneform-android-sdk) which supports the glTF format, how can you implement it in your flutter project with the arcore_flutter_plugin?