READ ALL TEXT HERE OR YOU WILL BE CONFUSED So I tried to make a thing that follows your mouse and it turned 'into this 'Search for the Blue Box!!' thingy. It is overcomplicated lol. Because I found a way to just follow something with the help of Griffpatch's smooth turning in the pathfinding tutorial. The thing I used it on was the MG turret on stage 21 of Project X: Revamped. SO ANYWAYS, let me tell you how this project works. STICKMAN 1. check if your direction is basically the same as the guide's direction (see Sprite2 inside the project, which acts as a guide to tell stick man here where to point) 1.5. start speed at a set number, (cause the divide block in step 3. won't work) 2. set a variable that will decide where you will turn to pick random 1 to -1 and if it is a 0, repeat until it is not a 0 (1 will mean you turn clockwise, -1 means you turn counter-clockwise). This also causes the stickman to turn in circles randomly but who cares it's funny. 3. if you're not pointing in the same direction, start increasing your turning speed until your direction is the same (through a change speed by speed / 0.5) 4. then decrease your turn speed to avoid an endless spin. (through a change speed by speed * 0.65) 5. (I put this step last on the list but it actually runs all the time) check if you are close enough to the Blue Box and if not, keep moving, else stop moving and increasing turn speed (if you are). Also if you're touching the edge, bounce off of it (this causes some bugs but I like it it looks derpy). GUIDE (Sprite2): if you press the spacebar, it will follow a cat that moves and bounces off the edge (1 to make it invisible, 2 to make it visible) which will make it look like you're randomly turning and then the stickman will follow (with smoothing ofc). If you press the left mouse button (LMB), it will follow your mouse cursor.
P.S: I might make a way to calculate the shortest direction to turn.