CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
322 stars 233 forks source link

Animation Rotation #91

Open roberto-donext opened 2 years ago

roberto-donext commented 2 years ago

How I can apply a basic animation to a 3d model?. I try to add the animation directly in the 3d file, but this doesn´t work, and then I tried to applied in code, but I don´t know how to achieve this effect using Tweens animations... Any one can help me? I would like to achieve the effect of al 3d model rotating around it own Z axi. Thanks

roberto-donext commented 2 years ago

I solved using a Ticker:

_ticker = createTicker((elapsed) {
  for (var node in _currentNodes) {
    Matrix4 newMatrix = Matrix4.copy(node.transform);
    newMatrix *= Matrix4.rotationY(0.0009 * elapsed.inSeconds);
    node.transform = newMatrix;
  }
});

_ticker.start();
dariocavada commented 2 years ago

Would be good to put someway as a documentation.

ChinmayaGit commented 2 years ago

hi is it possible to zoom in or zoom out or just move