SS3D
SS3D copied to clipboard
[WIP] Animation system
Summary
Early PR to keep track of what I've to do still and let other experiment with it. All features implemented are working in a separate environment from the main game since it needs a lot of testing and resetting, and I did not want to worry about modifying the current code and current human prefab which has issues for animation.
This PR intends to implement the following :
- interacting, holding, picking up, placing and throwing items all in a believable manner.
- Sitting
- Crawling
- hitting with a few weapons and fists
And make all of it work together.
It comes with this WIP design doc : https://docs.google.com/document/d/11wd4HigSu5Tn3ioCaafTzBFh7I_xzBOF/edit
PR checklist
- [ ] The game builds properly without errors.
- [ ] No unrelated changes are present.
- [ ] No "trash" files are committed.
- [ ] Relevant code is documented.
- [ ] Update the related GitBook document, or create a new one if needed.
Pictures/Videos)
Testing
Play with AnimationTests scene open. What you can do :
- Switch intent : space
- Switch throw mode : r
- Throw : y
- When holding a gun in harm mode : right click to aim
- Grab body on the ground : g
- Sit when close to the chair : j
- Fire when aiming: e
- Crouch and crawl : use the bool parameters in the animator controller on dummyHuman
Changes
TODO
- [x] remove throw as an intent, have throw work like aiming with a gun
- [x] add body orienting when aiming with a thrown item
- [x] make throwing item work on both arms
- [ ] Add crouching idle, crouching walk, crouching run animations
- [x] fix weird rotation between intent changes
- [x] fix gun aiming not getting to initial rotation when stopping to aim
- [x] fix firing exception
- [x] Don't fire if gun not in hand and aiming
- [x] Add max strenght to throw items
- [x] Add another two handed gun, another toolbox like item
- [ ] Add IK animations for screwdriver and wrench
- [ ] Add hold pose (animation override) for harm intent with gun (torso in diagonal)
- [ ] Add hold pose (torso straight, shoulder not moving) for most holds
- [x] Fix rotating when sitting and interacting/picking up/ placing/aiming
- [ ] When sitting, only rotate torso and allow interactions in front
- [ ] Add hand poses for different holding types.
- [x] fix update position constraint and rotation in holdcontroller, currently doesn't take into account character rotating while moving.
- [x] Fix throw item with two hands
- [x] stop aiming after throw
- [ ] Make grabbing body part smoother.
- [ ] Add grabbing position and movement