So, what I want to do here is to be able to switch between mouse and arrow controls. I got the saves down, and now I just need the math. With the arrow keys, left and right change the angle, but I’m stuck on the mouse and need to figure out how to set the mouse position to the angle of the deadeye. Any help @JR01 or anybody who knows trig?
Ok nvm it kinda broke everything
It just spazzed back and forth, and when I tried deleting the extracts and A-B things, it almost worked but not quite…
You need to find the difference of the coords of the cursor and the player, then use Math.tan(y/x). Put the angle from tan into sin and cos to find the final y and x respectively
Actually I’m looking at the code now, so you have the player always pointing at the aim object.
So what you want to do is re-add my AngleTo bundle (because you removed the extractors) and change the extractor to the player object (Ratatio).
Next you want to add an expression to match the rotation to the max rotation you used. Basically needing to convert 360 degrees into 64 numbers (because rotation loops on 64). That expression will look like this: A*(8/45)