I have a little problem with my project.
The basic idea is that the player will move towards the mouse position at all times, and at an increased speed when clicked. The problem is that i want a rotary layout, but when i add it, the player seem to follow the mouse in an incorrect way.
Its very hard to explain the issue, as i cant grasp the issue. Below is a capx, try it out and you will see the issue for your self!
Any help is greatly appreciated!
This looks like a problem for YANN to solve. He is the master of SIN and COS
set angle toward(mouse.x,mouse.y)"
set angle toward(mouse.x("layer 0"),mouse.y("layer 0"))
Adding the ("layername") only works with the mouse though, so you can't have object.x("layername") unfortunately.
also if you change the name of the layer, it doesn't update it in the expression.. so remember to rename it wherever you referenced it too.
Develop games in your browser. Powerful, performant & highly capable.
Thanks alot, it worked :)