AS3 move sprite along predefined curve

…衆ロ難τιáo~ 提交于 2020-01-17 02:21:48

问题


I want to make a circle(:Sprite) move along a pre-drawn curve. Using the graphics library a drew a 350 degree curve and I want my scrubber to move just from 0 degrees all tha way to 350 degrees without leaving the path. I found a great class from senocular.com that does this, but the problem is that Im limited to the lenght of the curve that I could use, since for it to work correctly I have to constrain myself to a maximum of a 90 degree curve. I also found another class that moves the sprite along a circle, but the problem with that is that once I reach the complete cycle. the sprite goes back to position 0. I just want the sprite to go from 0 - 350 and back, I dont want it to jump from 350 - 0. Is there any class or way to just draw the curve and attach the circle to that curve? Here are some pics:

来源:https://stackoverflow.com/questions/12966878/as3-move-sprite-along-predefined-curve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!