-
Notifications
You must be signed in to change notification settings - Fork 209
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
Fix: Sil/Sword combat and aim animation problem while walking/running. #2791
Closed
Closed
Changes from 26 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d6f72e1
branch: dev2.
gonnavis 1642d8c
branch: AnimationsOrigin.
gonnavis 0948491
fix bow not work bug. && dev.
gonnavis d17c77b
dev
gonnavis a2ee1c2
dev. && add pistol & rifle.
gonnavis 024ab7a
branch: AnimSwordWalk.
gonnavis d7f6681
lerp leg between sword and walk/run by idleWalkFactor.
gonnavis f055d6d
lerp full combo animation ( which already processed legs ) when start…
gonnavis 8c6c993
use isCombo instead of isTop.
gonnavis 9d869b7
trim combo animation's start a little.
gonnavis 8f576d3
trim combo animation's end to prevent sword cross player's head.
gonnavis c7a3435
Merge branch 'master' into AnimSwordWalk
gonnavis de84155
add silsword.
gonnavis d71e237
handle crouch sword.
gonnavis 939d70f
clean.
gonnavis 93e5d3b
fix aimAnimation while walk/run.
gonnavis b8db971
blend walk/run into arms when aiming.
gonnavis aeefba5
fix timing problem.
gonnavis b6c23c0
fix unuseAnimation not stop problem.
gonnavis f927d5a
new sword animations.
gonnavis f056c61
move trimClip() from runtime to baker.
gonnavis 2f87848
use isArm instead of isCombo.
gonnavis e16eb6a
check !isArm instead of isArm. && clean.
gonnavis f5392da
add `isLastBone`.
gonnavis 8dfa702
slowdown sword aiming animation.
gonnavis 441b049
generally handle end-action transition.
gonnavis 3c365d3
Revert "generally handle end-action transition."
gonnavis dd0ea6f
set `unuseAnimation = null` at outter.
gonnavis 276f6b5
Merge branch 'master' into AnimSwordWalkPr
gonnavis a923e49
Rebuild animations.z.
gonnavis 871866e
add comment.
gonnavis 1f4de6c
Merge branch 'master' into AnimSwordWalkPr
gonnavis 4dc4625
revert fixing of useAnimation not stop problem, may try in another PR.
gonnavis f6c2fe4
del trimClip().
gonnavis 713446d
revert changes of useAnimation.
gonnavis fdd9f79
improve & clean aimAnimation.
gonnavis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,73 @@ | ||
class AnimationMapping { | ||
constructor(animationTrackName, boneName, isTop, isPosition) { | ||
constructor(animationTrackName, boneName, isTop, isPosition, isArm) { | ||
this.animationTrackName = animationTrackName; | ||
this.boneName = boneName; | ||
this.isTop = isTop; | ||
this.isArm = isArm; | ||
this.isPosition = isPosition; | ||
} | ||
|
||
clone() { | ||
return new AnimationMapping(this.animationTrackName, this.boneName, this.isTop, this.isPosition); | ||
return new AnimationMapping(this.animationTrackName, this.boneName, this.isTop, this.isPosition, this.isArm); | ||
} | ||
} | ||
|
||
export const animationMappingConfig = [ | ||
new AnimationMapping('mixamorigHips.position', 'Hips', false, true), | ||
new AnimationMapping('mixamorigHips.quaternion', 'Hips', false, false), | ||
new AnimationMapping('mixamorigSpine.quaternion', 'Spine', true, false), | ||
new AnimationMapping('mixamorigSpine1.quaternion', 'Chest', true, false), | ||
new AnimationMapping('mixamorigSpine2.quaternion', 'UpperChest', true, false), | ||
new AnimationMapping('mixamorigNeck.quaternion', 'Neck', true, false), | ||
new AnimationMapping('mixamorigHead.quaternion', 'Head', true, false), | ||
new AnimationMapping('mixamorigHips.position', 'Hips', false, true, false), | ||
new AnimationMapping('mixamorigHips.quaternion', 'Hips', false, false, false), | ||
new AnimationMapping('mixamorigSpine.quaternion', 'Spine', true, false, false), | ||
new AnimationMapping('mixamorigSpine1.quaternion', 'Chest', true, false, false), | ||
new AnimationMapping('mixamorigSpine2.quaternion', 'UpperChest', true, false, false), | ||
new AnimationMapping('mixamorigNeck.quaternion', 'Neck', true, false, false), | ||
new AnimationMapping('mixamorigHead.quaternion', 'Head', true, false, false), | ||
|
||
new AnimationMapping('mixamorigLeftShoulder.quaternion', 'Left_shoulder', true, false), | ||
new AnimationMapping('mixamorigLeftArm.quaternion', 'Left_arm', true, false), | ||
new AnimationMapping('mixamorigLeftForeArm.quaternion', 'Left_elbow', true, false), | ||
new AnimationMapping('mixamorigLeftHand.quaternion', 'Left_wrist', true, false), | ||
new AnimationMapping('mixamorigLeftHandMiddle1.quaternion', 'Left_middleFinger1', true, false), | ||
new AnimationMapping('mixamorigLeftHandMiddle2.quaternion', 'Left_middleFinger2', true, false), | ||
new AnimationMapping('mixamorigLeftHandMiddle3.quaternion', 'Left_middleFinger3', true, false), | ||
new AnimationMapping('mixamorigLeftHandThumb1.quaternion', 'Left_thumb0', true, false), | ||
new AnimationMapping('mixamorigLeftHandThumb2.quaternion', 'Left_thumb1', true, false), | ||
new AnimationMapping('mixamorigLeftHandThumb3.quaternion', 'Left_thumb2', true, false), | ||
new AnimationMapping('mixamorigLeftHandIndex1.quaternion', 'Left_indexFinger1', true, false), | ||
new AnimationMapping('mixamorigLeftHandIndex2.quaternion', 'Left_indexFinger2', true, false), | ||
new AnimationMapping('mixamorigLeftHandIndex3.quaternion', 'Left_indexFinger3', true, false), | ||
new AnimationMapping('mixamorigLeftHandRing1.quaternion', 'Left_ringFinger1', true, false), | ||
new AnimationMapping('mixamorigLeftHandRing2.quaternion', 'Left_ringFinger2', true, false), | ||
new AnimationMapping('mixamorigLeftHandRing3.quaternion', 'Left_ringFinger3', true, false), | ||
new AnimationMapping('mixamorigLeftHandPinky1.quaternion', 'Left_littleFinger1', true, false), | ||
new AnimationMapping('mixamorigLeftHandPinky2.quaternion', 'Left_littleFinger2', true, false), | ||
new AnimationMapping('mixamorigLeftHandPinky3.quaternion', 'Left_littleFinger3', true, false), | ||
new AnimationMapping('mixamorigLeftShoulder.quaternion', 'Left_shoulder', true, false, true), | ||
new AnimationMapping('mixamorigLeftArm.quaternion', 'Left_arm', true, false, true), | ||
new AnimationMapping('mixamorigLeftForeArm.quaternion', 'Left_elbow', true, false, true), | ||
new AnimationMapping('mixamorigLeftHand.quaternion', 'Left_wrist', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandMiddle1.quaternion', 'Left_middleFinger1', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandMiddle2.quaternion', 'Left_middleFinger2', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandMiddle3.quaternion', 'Left_middleFinger3', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandThumb1.quaternion', 'Left_thumb0', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandThumb2.quaternion', 'Left_thumb1', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandThumb3.quaternion', 'Left_thumb2', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandIndex1.quaternion', 'Left_indexFinger1', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandIndex2.quaternion', 'Left_indexFinger2', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandIndex3.quaternion', 'Left_indexFinger3', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandRing1.quaternion', 'Left_ringFinger1', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandRing2.quaternion', 'Left_ringFinger2', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandRing3.quaternion', 'Left_ringFinger3', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandPinky1.quaternion', 'Left_littleFinger1', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandPinky2.quaternion', 'Left_littleFinger2', true, false, true), | ||
new AnimationMapping('mixamorigLeftHandPinky3.quaternion', 'Left_littleFinger3', true, false, true), | ||
|
||
new AnimationMapping('mixamorigRightShoulder.quaternion', 'Right_shoulder', true, false), | ||
new AnimationMapping('mixamorigRightArm.quaternion', 'Right_arm', true, false), | ||
new AnimationMapping('mixamorigRightForeArm.quaternion', 'Right_elbow', true, false), | ||
new AnimationMapping('mixamorigRightHand.quaternion', 'Right_wrist', true, false), | ||
new AnimationMapping('mixamorigRightHandMiddle1.quaternion', 'Right_middleFinger1', true, false), | ||
new AnimationMapping('mixamorigRightHandMiddle2.quaternion', 'Right_middleFinger2', true, false), | ||
new AnimationMapping('mixamorigRightHandMiddle3.quaternion', 'Right_middleFinger3', true, false), | ||
new AnimationMapping('mixamorigRightHandThumb1.quaternion', 'Right_thumb0', true, false), | ||
new AnimationMapping('mixamorigRightHandThumb2.quaternion', 'Right_thumb1', true, false), | ||
new AnimationMapping('mixamorigRightHandThumb3.quaternion', 'Right_thumb2', true, false), | ||
new AnimationMapping('mixamorigRightHandIndex1.quaternion', 'Right_indexFinger1', true, false), | ||
new AnimationMapping('mixamorigRightHandIndex2.quaternion', 'Right_indexFinger2', true, false), | ||
new AnimationMapping('mixamorigRightHandIndex3.quaternion', 'Right_indexFinger3', true, false), | ||
new AnimationMapping('mixamorigRightHandRing1.quaternion', 'Right_ringFinger1', true, false), | ||
new AnimationMapping('mixamorigRightHandRing2.quaternion', 'Right_ringFinger2', true, false), | ||
new AnimationMapping('mixamorigRightHandRing3.quaternion', 'Right_ringFinger3', true, false), | ||
new AnimationMapping('mixamorigRightHandPinky1.quaternion', 'Right_littleFinger1', true, false), | ||
new AnimationMapping('mixamorigRightHandPinky2.quaternion', 'Right_littleFinger2', true, false), | ||
new AnimationMapping('mixamorigRightHandPinky3.quaternion', 'Right_littleFinger3', true, false), | ||
new AnimationMapping('mixamorigRightShoulder.quaternion', 'Right_shoulder', true, false, true), | ||
new AnimationMapping('mixamorigRightArm.quaternion', 'Right_arm', true, false, true), | ||
new AnimationMapping('mixamorigRightForeArm.quaternion', 'Right_elbow', true, false, true), | ||
new AnimationMapping('mixamorigRightHand.quaternion', 'Right_wrist', true, false, true), | ||
new AnimationMapping('mixamorigRightHandMiddle1.quaternion', 'Right_middleFinger1', true, false, true), | ||
new AnimationMapping('mixamorigRightHandMiddle2.quaternion', 'Right_middleFinger2', true, false, true), | ||
new AnimationMapping('mixamorigRightHandMiddle3.quaternion', 'Right_middleFinger3', true, false, true), | ||
new AnimationMapping('mixamorigRightHandThumb1.quaternion', 'Right_thumb0', true, false, true), | ||
new AnimationMapping('mixamorigRightHandThumb2.quaternion', 'Right_thumb1', true, false, true), | ||
new AnimationMapping('mixamorigRightHandThumb3.quaternion', 'Right_thumb2', true, false, true), | ||
new AnimationMapping('mixamorigRightHandIndex1.quaternion', 'Right_indexFinger1', true, false, true), | ||
new AnimationMapping('mixamorigRightHandIndex2.quaternion', 'Right_indexFinger2', true, false, true), | ||
new AnimationMapping('mixamorigRightHandIndex3.quaternion', 'Right_indexFinger3', true, false, true), | ||
new AnimationMapping('mixamorigRightHandRing1.quaternion', 'Right_ringFinger1', true, false, true), | ||
new AnimationMapping('mixamorigRightHandRing2.quaternion', 'Right_ringFinger2', true, false, true), | ||
new AnimationMapping('mixamorigRightHandRing3.quaternion', 'Right_ringFinger3', true, false, true), | ||
new AnimationMapping('mixamorigRightHandPinky1.quaternion', 'Right_littleFinger1', true, false, true), | ||
new AnimationMapping('mixamorigRightHandPinky2.quaternion', 'Right_littleFinger2', true, false, true), | ||
new AnimationMapping('mixamorigRightHandPinky3.quaternion', 'Right_littleFinger3', true, false, true), | ||
|
||
new AnimationMapping('mixamorigRightUpLeg.quaternion', 'Right_leg', false, false), | ||
new AnimationMapping('mixamorigRightLeg.quaternion', 'Right_knee', false, false), | ||
new AnimationMapping('mixamorigRightFoot.quaternion', 'Right_ankle', false, false), | ||
new AnimationMapping('mixamorigRightToeBase.quaternion', 'Right_toe', false, false), | ||
new AnimationMapping('mixamorigRightUpLeg.quaternion', 'Right_leg', false, false, false), | ||
new AnimationMapping('mixamorigRightLeg.quaternion', 'Right_knee', false, false, false), | ||
new AnimationMapping('mixamorigRightFoot.quaternion', 'Right_ankle', false, false, false), | ||
new AnimationMapping('mixamorigRightToeBase.quaternion', 'Right_toe', false, false, false), | ||
|
||
new AnimationMapping('mixamorigLeftUpLeg.quaternion', 'Left_leg', false, false), | ||
new AnimationMapping('mixamorigLeftLeg.quaternion', 'Left_knee', false, false), | ||
new AnimationMapping('mixamorigLeftFoot.quaternion', 'Left_ankle', false, false), | ||
new AnimationMapping('mixamorigLeftToeBase.quaternion', 'Left_toe', false, false), | ||
new AnimationMapping('mixamorigLeftUpLeg.quaternion', 'Left_leg', false, false, false), | ||
new AnimationMapping('mixamorigLeftLeg.quaternion', 'Left_knee', false, false, false), | ||
new AnimationMapping('mixamorigLeftFoot.quaternion', 'Left_ankle', false, false, false), | ||
new AnimationMapping('mixamorigLeftToeBase.quaternion', 'Left_toe', false, false, false), | ||
]; |
Oops, something went wrong.
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.
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 is ok to ship, but I think we can fix this in the animation itself in the long term.
Maybe add a comment here/open an issue to trim this animation in Blender.
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.
Ok, added comment first. eb1b8da
I also want to trim this sword animation into three pieces, if the other pr can be merged #2804 .
I'll request artist asset afterwards.