Need Sprite to follow mouse at one point, but rotate on another

N

navyblanket

Guest
I have an object (attached) that I want to point at the mouse. Essentially, the player character draws the arm on top of it, and I want it to aim at the mouse, while rotating around the orange ball "shoulder." I have it's angle as a variable "dir," which is simply the point direction of the mouse. this causes it to rotate based on the origin point. This causes issues, however, as the origin aims at the mouse, not the arm cannon portion. I want it to rotate around the orange portion, with the end of the blaster pointed at the mouse.
 

Attachments

woods

Member
manually set the origin to the center of the orange ball?

edit:
Essentially, the player character draws the arm on top of it
as in draw_sprite ...?
or
instance_create obj_arm ....and in obj_arm x=obj_player.x ...?
 
Last edited:

Sabnock

Member
Why not have the arm portion as a separate instance and set it's position relative to the parents and then point it at the moise using point_direction() and image_angle()?

Hopefully I have understood your issue correctly.
 
Top