flutter_cube
flutter_cube copied to clipboard
Update texture
i have a scene and a 3d object (parent) with 2 childreen. cube0= Object(filename: 'assets/parent.obj'); cube1 = Object(filename: 'assets/child1.obj'); cube2 = Object(filename: 'assets/child2obj'); cube0.add(cube1); cube0.add(cube2); scene.world.add(cube0);
i want to update the texture of cube1 with an image If i write: cube1.mesh.texture = (load image /image1.jpg) scene.updateTexture(); // not working
If i want to update the texture of cube0 with an image and i write: cube0.mesh.texture = (load image /image0.jpg) scene.updateTexture(); // update cube0 and his sons
Any solution?
I am having same issue, I have created a separate global variable called _scene. When updating it like this it is not updating the scene.
face.position.setValues(x, y, z);
_scene.update();
Just tried this solution and it worked:
face.updateTransform();