make rotor position values wrap around seemlessly

Luppen shared this feedback 4 days ago
Not Enough Votes

hello!

the way you do this is that you keep the current control for the players to set the minimum, and maximum degrees with the current gauges: setting either to unlimited, or not will also be the same, except,:

  1. make the unlimited setting to be the 360th degree, such that 360s are removed from the gauges, and only 0s are present in these gauges (minimum, and maximum rotation degrees).
  2. when you check whether a rotor has passed the player set threshold, you check the direction of the change of the rotor's orientation in the respective frame (or unit of deal in your physics engine)

if both

  1. the direction is against the threshold the player set, and
  2. the change makes the new position of the rotor on the other side of the respective threshold
  • then set the rotor's position to the threshold's

the direction is important because when the rotor is at the other side of the threshold already, it is suposed to be able to pass the threshold the direction the threshold is not applied (currently this scenario is treated as a wildcard - my suggestion is to not treat it as a wildcard, but to embrace it the following way)

  • for minimum value gauge the rotor's position can pass the threshold increasing, but not decreasing
  • for maximum value gauge the rotor's position can pass the threshold decreasing, but not increasing

due to this: a player will be able to set up both thresholds independent of one another (currently minimum value must be lower than maximum value which makes players take much care with the initial orientation of the rotor - my suggestion is to not make the player to)

  1. when the change of the rotor head's orientation is negative - only then you check it against the minimum threshold in the minimum value gauge
  2. when the change of the rotor head's orientation is positive - only then you check it against the maximum threshold in the maximum value gauge
  3. you do no checks in any other cases (such as to determine whether a rotor is not out of bounds since by seemlessly wrapping it around you can never have out of bounds with rotors - that is the point i am suggesting)

note - the player can update either one of the thresholds while the rotor's position is there. either no longer update the rotor's current position as a threshold is set near it, or (in order to maintain current functionality) make the rotor's position pushed into the direction the player is setting threshold, and posibly even "pushed through" either zero, or 359 degrees to the next cycle with possibly a new gauge. maybe make those gauges look like a closed circle gauge, not a flat, and open - as those are currently

Leave a Comment
 
Attach a file