Comparing Unity-Technologies:develop...Xiout:develop · Unity-Technologies/InputSystem · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Unity-Technologies/InputSystem
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: develop
Choose a base ref
...
head repository: Xiout/InputSystem
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 13 commits
  • 40 files changed
  • 1 contributor

Commits on Dec 3, 2022

  1. Open project in version 2019.4.40

    CHANGE
    -Updated to version 2019.4.40f1
    Xiout committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    02e6338 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2022

  1. Create and register CircleInteraction from HoldInteraction

    ADD
    -CircleInteraction custom interaction (copy from HoldInteraction)
    -Add "RegisterInteraction" method that will be called thanks to InitializeOnLoad declarative tag
    -[SCENE] Create scene for testing CircleInteraction
    Xiout committed Dec 5, 2022
    Configuration menu
    Copy the full SHA
    7eb7b84 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2022

  1. PlayerController of the testing scene

    ADD
    -Implement Update() method of PlayerController using Input System for testing purposes.
    Xiout committed Dec 25, 2022
    Configuration menu
    Copy the full SHA
    8f8f678 View commit details
    Browse the repository at this point in the history
  2. Update CircleInteraction.cs

    CHANGE
    -Change Process() logic of CircleInteraction :
    --The interaction is started when clicked and performed when the points collected over time form a circle. If the clic is released before the circle is formed, the interaction is cancelled
    
    TODO
    -Find a better way to collect positions over time. Currently, collect only during process() method, ie. when the control binded change of value (here mouse left click). OnUpdate() method had been added to collect positions every frame but is never called.
    -Implement the IsACircle() method to define if a list of points form a circle.
    Xiout committed Dec 25, 2022
    Configuration menu
    Copy the full SHA
    9e494f0 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2022

  1. CircleInteraction is now design for Value (Vector2) Action

    ADD
    -Generated CircleAction (InputAction) to have access to action into the PlayerController debug script
    
    CHANGE
    -PlayerController script is now using CircleAction instead of OnTurn() method
    -"Turn" Actions is now Value Type (Vector2) instead of Button Type
    -Modify logic inside CircleInteraction to receive Vector2 from Mouse Position. The action is started and/or cancel depending on a hold click on another control of the same device (here mouse)
    -Update Logic of temporary IsACircle method to take the accuracyOffset in acount
    
    TODO
    -Add a visual representation of the points collected during the interaction Process() to help the debug using sprites
    -Implement the actual logic to define if the groupe of point form a circle
    Xiout committed Dec 29, 2022
    Configuration menu
    Copy the full SHA
    32244a6 View commit details
    Browse the repository at this point in the history
  2. Create Visual Aid for Debug

    ADD
    -In PlayerController, add listener for "performed" "started" and "canceled" callback event from InputAction "Turn"
    -When an InputAction "Turn" is started, draw a orange point on the screen for each collected point, when the InputAction "Turn" is performed, draw a green point on the screen for each newly colelcted point. Wipe out previous drawn points at the beginning of each InputAction.
    Xiout committed Dec 29, 2022
    Configuration menu
    Copy the full SHA
    4ca620f View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2022

  1. Implementation Circle Recognition furthest points

    ADD
    -Create Circle class that contains a Vector2 as Center and a float as Radius
    -Implement GetCircleFurthestPoints that, for a list of point, return the circle that have for diameter the distance of the 2 furthest points and for center the middle of these 2 points
    -Add Visual aid in grey for the "CircleFurthestPoints" for comparison with the actual points when the "Turn" action is just performed
    
    TODO
    -Optimization of the FindFursthestPoints method
    -Use actual circle recognition in CircleInteraction
    -Add back "duration" parameters (min and max) for CircleInteraction to avoid too early circle calculation and reject action that takes too long without result.
    Xiout committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    8280c2f View commit details
    Browse the repository at this point in the history
  2. CircleInteraction now recognizes circles

    ADD
    -Implementation of IsCircle() method that defines if all the points are between 2 circles defined with GetCircleFurthestPoints() and the accuracyPercent
    -Draw in red all points that are outside the 2 circles for debuging visual aid
    -Add durationMin and durationMax on CircleInteraction to define the lap of time in which the circle must be performed to be registered
    
    CHANGE
    -Move GeometryHelp class into InputSystem.Utilities namespace
    -use accuracyPercent instead of accuracyOffset so the offset is proportional to the radius of the circle
    Xiout committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    22cb557 View commit details
    Browse the repository at this point in the history
  3. Refactoring and new Circle Method

    CHANGE
    -Add comments, summary, remove a few Debug.Log and factorize the code in PlayerController to have a separate method to draw DebugPoint
    
    ADD
    -Enum CircleMethod to select which method to use to check if the list of point is a circle
    -[WIP] new circle method "Get3PointsCircle" that calculate the circle using 3 points (not working yet)
    
    TODO
    -Fix Get3PointsCircle
    Xiout committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    eec3dfe View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2022

  1. Fix Get3pointsCircle and add circleMethod as param

    FIX
    -Get3pointsCircle is now drawing an accurate circle (source : https://www.xarg.org/2018/02/create-a-circle-out-of-three-points/?fbclid=IwAR1JvB5kGlr1E16c0TXPPn1sWt5r8Esw2ssG5YMICDGaCjjHO9SG5tpgLQs). The results with this new method are are slightly worse than with GetCircleFurthestPoints
    
    ADD
    -Add CircleInteraction parameter to leave the choice on which circle recognition method will be used
    -EnumSetting struct in InputParameterEditor in order to add option dropdown for enum value in the Interaction GUI
    Xiout committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    34e5628 View commit details
    Browse the repository at this point in the history
  2. Gamepad stick circle recognition implementation

    ADD
    -GetCircleGamepadValue() that return a circle with 0,0 as center and 1 as radius
    -Add IsHold() that define if the control is actuated and if an additional button is press in case the device used is the mouse.
    -Add IsCircle() logic for Gamepad circle method. As the gamepad stick draws perfect circle but start acquiring values before being on the circumference, the method of the 2 limit circle does not work here. Instead,  if most of the point lies on the circumference and if the points are mostly spread evenly, the list of points is considered as a circle.
    -For debug purpose, when using the Gamepad, the points acquired are multiplied and translated to be displayed legibly in the middle of the screen.
    
    CHANGE
    -GetCircle3Points() and GetCircleFurthestPoints() become private, GetCircle() is now use and take as parameter the list of points and the CircleMethod to be used
    -The value treated during CircleInteraction Process() is now from ReadValue() instead of ReadUnprocessedValue() because the unprocessed value caused some trouble with the gamepad stick
    -IsFirstPointLastPoint had been removed, its logic had been moved to IsCircle() in GeometryHelp class.
    
    REMOVE
    -Remove Debug.Log and dead code
    Xiout committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    2ebbd99 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e6ac18 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Merge pull request #1 from Xiout/CircleInteraction

    NEW : Circle interaction
    Implementation of CircleInteraction that analyses a list of Vector2 collected during the process and defines if the points form a circle with a set degree of accuracy.
    
    The CircleInteraction works both for the Mouse (position) and the Gamepad (LeftStick, RightStick, and D-pad).
    When using the Mouse, since the position is always actuated as long as the game runs, any mouse button must be pressed during the circle recognition to be registered.
    Xiout authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    2fc9a6c View commit details
    Browse the repository at this point in the history
Loading