How to rotate an image x degrees then move in that direction?

主宰稳场 提交于 2019-12-04 18:26:34

You have to calculate the new coordinates thanks to the law of cosines. http://en.wikipedia.org/wiki/Law_of_cosines Once you have calculated the angle, you have to be careful because you will get an absolute angle.

Don't hesitate if you need more help. I also have to do this calculation using KineticJS.

Good luck !

The JS Math Object will be useful I guess : http://www.w3schools.com/jsref/jsref_obj_math.asp

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