#aiming deadzone, converting positions to vectors.
8 messages · Page 1 of 1 (latest)
** You are now Level 1! **
The jist of the code is I have one small circle that is moved by the mouse's delta. I convert its position into a vector(from screen center). If its still within the range of the large circle it replicates its position to a second small circle. if its not then I create a percentage based on its distance from the edge of the screen and create a new vector that's length is (that percentage) * (radius of the large circle). That new vector is converted into a udim2 position and applied to the second small circle.
I multiply that percentage by an aribitrary number (8 atm) to aritifically constrain the movement to a portion of the screen so the player does't actually have to move the circle to the edge to get the second circle to its maximum range.
even though this discord sucks ill still put the updated code, got it working myself.
** You are now Level 2! **