I want an arrow image to point toward an object that randomly appears somewhere in the layout.
I made it every tick - set angle toward object.x, object.y but the arrow will not face directly at where the object is and even though I used every tick it doesn't correct itself if you move around the object.
Develop games in your browser. Powerful, performant & highly capable.
is the arrow pointed right in the original image?
is the origin of the arrow at the left?
actually the origin doesn't need to be on the left, but it could be off in comparison with the arrow sprite..
Yeah. The arrow is pointed toward the right in the original image.
The origin is in the middle. I have tried left and right but it didn't seem to effect it that much.
I tried to duplicate what is going on and made a capx of it here -https://www.dropbox.com/s/ky4nsqju175cs24/arrowproblem.capx-
Issue is your arrow is on a different layer with different paralax..
Here's one way to solve it..
It works perfectly. Thanks so much. I never knew about being able to set positions to the viewport like that.