Great work, 99% what I was looking for.
I wanted to add a bounce into the step so it's a more realistic walk. General suggestions on how to implement would be nice.
Also, when holding down a direction button and letting go, it keeps going for way too long. Eg: Hold rotate for a few and let go, it will make 3+ more rotations after letting go. I'm guessing the command queue is built up to far. Was thinking of onKeyUp, clearing or limiting the queue.
Coding C# since it came out, but fairly new to Unity.
Thanks.
Suggestions for adding in bouncing to walk and clearing the command queue
-
- Posts: 2
- Joined: Thu Nov 10, 2022 8:46 pm
Re: Suggestions for adding in bouncing to walk and clearing the command queue
Hi,
Thanks for using Grid Controller!
I'll add a head bob option in the next update. If you want to implement it in the meantime, you can subclass GridController.cs and override this method:
It's a coroutine that moves the player to its new position over a move duration.
Good catch on the issue when holding down a direction button. I'll address that in the next update, too. It's a little more complicated than just clearing the queue on key up. If the player rapidly taps and releases the "move forward" key 10 times, it should queue up 10 "move forward" commands. But if the player has been receiving "move forward" inputs for a key that's held down, it should probably clear the queue on key up.
I'll aim to have those done and available in a downloadable patch early next week.
Thanks for using Grid Controller!
I'll add a head bob option in the next update. If you want to implement it in the meantime, you can subclass GridController.cs and override this method:
Code: Select all
protected virtual IEnumerator Move(Vector3 moveVector, CompassDirection moveHeading)
Good catch on the issue when holding down a direction button. I'll address that in the next update, too. It's a little more complicated than just clearing the queue on key up. If the player rapidly taps and releases the "move forward" key 10 times, it should queue up 10 "move forward" commands. But if the player has been receiving "move forward" inputs for a key that's held down, it should probably clear the queue on key up.
I'll aim to have those done and available in a downloadable patch early next week.
-
- Posts: 7
- Joined: Fri Jan 01, 2021 12:53 pm
Re: Suggestions for adding in bouncing to walk and clearing the command queue
You can always hook into the ExitingPosition event and run a coroutine from there as well. Its fairly easy to implement.
-
- Posts: 2
- Joined: Thu Nov 10, 2022 8:46 pm
Re: Suggestions for adding in bouncing to walk and clearing the command queue
Excellent. Thank you for the quick reply. Good catch on the tapping vs holding.
Re: Suggestions for adding in bouncing to walk and clearing the command queue
Hi,
Thank you very much for reviewing Grid Controller! The next version will be submitted Monday morning, so it should be available as soon thereafter as it gets out of the Asset Store team's queue.
Which classes would you like to see more comments on? ("All of them" is a perfectly valid answer, too.)
Thank you very much for reviewing Grid Controller! The next version will be submitted Monday morning, so it should be available as soon thereafter as it gets out of the Asset Store team's queue.
Which classes would you like to see more comments on? ("All of them" is a perfectly valid answer, too.)
Re: Suggestions for adding in bouncing to walk and clearing the command queue
Grid Controller 1.0.2 is now live on the Asset Store. It has a head bob option, and it clears the movement queue when releasing a held-down movement input.