Fix typo that may cause crouch to always be true#7
Open
NRJulian wants to merge 1 commit intoBrackeys:masterfrom
Open
Fix typo that may cause crouch to always be true#7NRJulian wants to merge 1 commit intoBrackeys:masterfrom
NRJulian wants to merge 1 commit intoBrackeys:masterfrom
Conversation
A typo in the `if` statement in line 67 may cause the `crouch` bool to always check `true`. This revision simply changes the `(!crouch)` in line 67 to the intended `(crouch)` so that the script works as expected. Thank you!
ertanturan
reviewed
Jan 15, 2020
| { | ||
| // If crouching, check to see if the character can stand up | ||
| if (!crouch) | ||
| if (crouch) |
There was a problem hiding this comment.
The soultion brings a good fix . Accepting pull req. would solve the issue ...
There was a problem hiding this comment.
Had a similar solution. @ATBrackeys this is a bug and should be addressed.
There was a problem hiding this comment.
Looks like it was intended to check when the Parameter for crouch was false (the user/player stop holding the crouch input button) so then it could check if the PlayerObject could "stand up"
Still learning unity but adding something below as well as setting k_CeilingRadius to a lower float fixed my problem
Suggested change
| if (crouch) | |
| if (m_wasCrouching && !crouch) |
BenedictRasmussen
approved these changes
Apr 26, 2020
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.
A typo in the
ifstatement in line 67 may cause thecrouchbool to always checktrue. This revision simply changes the(!crouch)in line 67 to the intended(crouch)so that the script works as expected. Thank you!