Rocket launch updates#80
Open
K-Meech wants to merge 8 commits into
Open
Conversation
Collaborator
|
The code looks good, I'll be able to double check how it works in play when I get home and have access to my eye tracker! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decided to split these small fixes into a separate PR, rather than rolling them in with the save data for #20 . Mostly small fixes that make testing the rocket launch game easier, or make it simpler to access values that change between games to add to the save data.
reduced
gazeTolerancesetting from 300 to 2 in the unity editor (otherwise the entire game field of view is within the gaze target range)when
useMouseForTrackeris checked, I added a line to make sure the mouse world position is used (rather than raw coordinates). This means that when the checkbox is ticked, and the game is played in the editor, mousing over the launch code box advances the numbers, while holding the mouse towards the edges doesn't (so it's matching what the real gaze point would do)For the save data, I wanted to capture all values that vary between games. Due to
shakeSpeedReductionthis includes the minimum required head speed (different for pitch vs yaw games). To make this easier to capture in the save data, I split this into two variablesminimumSpeedPitch/minimumSpeedYawwhich get chosen between at the start of the game to populateminimumSpeed. Potentially this is also easier to read at a glance, then having to multiplyminimumSpeedbyshakeSpeedReduction.I also wanted to capture the final
gazeTolerancefor each game. This was challenging for the current setup as:gazeBuffer.gazeSteady, thegazeToleranceis passed asgazeTolerance * gazeTol.magnitude(withgazeTol.magnitudebeing based on a measure of the size of the target object). This means the actual gaze tolerance used for the calculation isn't equal togazeTolerance.gazeTolerancewas set to 300 (covering the full screen), the box was still much smaller.To get around this, I added some code to scale the target object (and launch progress ring) to match the input
gazeTolerance. This should mean the size always matches, so if you look just outside the launch code box the numbers won't advance, while just inside they will. This meansgazeTolerancecan get passed directly togazeBuffer.gazeSteadyalso, meaning this saved value will accurately reflect the tolerance used.Happy to change / discuss any of these points - thanks!