-
Notifications
You must be signed in to change notification settings - Fork 61
Animation Game Piece Intake [AARD-1973]
#1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Jolt is really confusing me. There seems to be only one face of the game piece where the intake animation works smoothly. Every other face of the cube results in the outward motion where the game piece rotates until the "correct" face is facing towards the ejector and moves back towards it. |
dfd844f
to
bc8a88e
Compare
Made logic fixes which involved some janky matrix operations (thanks Hunter!). The animation isn't perfect (see attached video), but the game piece now goes directly to the ejector rather than some weird movement. After discussion, we think the rotation part is something that just can't be fixed in the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
...n/src/ui/panels/configuring/assembly-config/interfaces/ConfigureGamepiecePickupInterface.tsx
Show resolved
Hide resolved
const y = x[1] instanceof ScoringZoneSceneObject | ||
return y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was such a funny predicate body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little concerned that the lerp results in a squished/compressed game piece.
Is it possible the animation can use gradual acceleration and an instant stop to make it look a little more realistic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rotation is a little funky but if not easily fixible, lgtm
The pieces appear to be squished/compressed because of the ejector position, so only half of the piece is underneath the field. The ideal solution for this ticket was for a "smooth sliding" animation, but I see what you mean by the gradual acceleration. |
Ah got it. This is fine then
Well what you've got is obviously smooth in transit, but not at start/stop. I advised the gradual acceleration to fix the start part, but I think it's too unrealistic for it to gradually decelerate, which is why I advised the snap stop (part has hit the end of the intake/feed-forward). |
64065b6
to
088abf6
Compare
Ah, got it. Thanks for the suggestion. I changed the position lerping to increase as a cubic, and snap at the end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever I pick up a game piece the robot starts to move backwards (I never pressed move back (s) in this video)
Screen.Recording.2025-07-22.at.10.02.29.AM.mov
If this is something that only happens on my device and isn't easy to fix, I think that it would be fine if you were to add an option in settings to enable/disable game piece animation, that way only people who it works for use it.
Interesting, I was able to reproduce this error on my computer as well. The fix was using a quadratic for the alpha in lerpVectors rather than a cubic. The gradual acceleration is more subtle, but I think it serves its purpose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Task
Create a simple intake animation for gamepieces. Should be a simple sliding animation that moves the gamepiece from its original position to the position it will be held in till its ejected.
Jira Ticket
Symptom
On intake, the gamepiece immediately snaps to the ejectable.
Solution
Lerp from the starting gamepiece position to the held position. Allow user to also configure the animation duration (to kind of simulate different intake motor speeds).
Verification
Before merging, ensure the following criteria are met: