Aframe: Physics + Animation

274 Views Asked by At

I find when I apply Don Mccurdy's physics system to a body by setting it as a dynamic-body, any animations using Ngokevin's animation component does not seem to get activated? For e.g something like this does not call the animation

<a-entity geometry="primitive:sphere;" material="color:red" dynamic-body
  animation="property:rotation; to:0 360 0; loop:true"></a-entitiy>

Any work around on this? Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

You cannot use them both at once as they collide and do the same thing (move the entity). Disable / pause dynamic-body component (e.g., el.components['dynamic-body'].pause() might work or removeAttribute('dynamic-body')) before starting animation.