W
Wiffo
Guest
Hey guys, I'm trying to create something like the attached image, with the little cursor always being a set distance away from the player character and rotating to where your mouse is pointed.
I don't really know where to start. I was thinking about just creating the cursor object at a set distance from the character and rotate towards wherever the mouse is, but I'm not very sure how to do that.
All I have right now is:
But that code is obviously not working. Can someone help? How do I keep the object at a set distance away from my character, and rotate the cursor?
Thank you.
I don't really know where to start. I was thinking about just creating the cursor object at a set distance from the character and rotate towards wherever the mouse is, but I'm not very sure how to do that.
All I have right now is:
cursor_sprite = sCursor;
x = mouse_x;
y = mouse_y;
image_angle = point_direction(x,y,mouse_x,mouse_y);
x = mouse_x;
y = mouse_y;
image_angle = point_direction(x,y,mouse_x,mouse_y);
But that code is obviously not working. Can someone help? How do I keep the object at a set distance away from my character, and rotate the cursor?
Thank you.