stemkoski/A-Frame-Examples

Curve following

Closed this issue · 3 comments

Any thoughts to adding pause, resume, and reverse to curve following component? To me these features haven been hard to implement. I got them working with out of box aframe animation over multiple paths but it doesnt support curves.

Thanks for all the examples!

You can pause the component with document.getElementById("jetModel").setAttribute("curve-follow","enabled: false").
I just tried it out in the console. Reversing should be a matter of inversing the time.

As mentioned in the commit, you can:

  • start/stop movement with setAttribute("curve-follow", "enabled", "true") (or "false")
  • reverse/normal movement with setAttribute("curve-follow", "reverse", "true") (or "false")

Hope this helps!

Thanks a bunch, and works great. Much better than might thoughts about keeping track of multiple paths and reversing arrays.