Curve following
Closed this issue · 3 comments
twoxfh commented
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!
dirkk0 commented
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.
stemkoski commented
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!
twoxfh commented
Thanks a bunch, and works great. Much better than might thoughts about keeping track of multiple paths and reversing arrays.