Im kind of stuck with this problem
i created this function but for some reason i can only move the object to the right of the Player.
If i try to move the object to the Left of the Player is goes right.
here is my approach:
int Speed = 8;
int x = Player_x - Mouse_x;
int y = Player_y - MOuse_y;
float deg = atan(y / x);
float erg_x = Speed * cos(deg);
float erg_y = Speed * sin(deg);
erg_x/y are the numbers i use at the end to move the Object.
Please help me :)