-
Notifications
You must be signed in to change notification settings - Fork 210
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
Vertical swimming. #3251
Vertical swimming. #3251
Conversation
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.
I have added a review. Mostly cosmetic and PR cleanups.
ai/lore/lore-model.js
Outdated
export * from 'http://127.0.0.1:8080/lore-model.js'; |
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.
please remove this from PR
isFirstBone, | ||
} = spec; | ||
|
||
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 looks like VSCode auto formatting.
I know we have a bunch of red squigglies, but can we remove these / paste them back in for the sake of making a really simple PR and then we can do formatting separately?
avatars/animationHelpers.js
Outdated
dst.slerp(localQuaternion2, f); | ||
|
||
|
||
|
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.
no need for these spaces
scenes/water.scn
Outdated
0, | ||
0 | ||
], | ||
"start_url": "/practice/dual-contouring-terrain-main/" |
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.
do we need these changes in pr?
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.
No, we don't need these changes. I made them to have more space for swimming while testing. Will remove them.
avatars/animationHelpers.js
Outdated
|
||
|
||
// Swinging Hips for Breaststroke | ||
if(boneName === 'Hips' && avatar.sprintFactor === 0 && movementsTimeS > 0) { |
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.
since we are checking if bonename === hips below, could we embed this boolean check inside the other one?
@@ -977,16 +977,28 @@ class UninterpolatedPlayer extends StatePlayer { | |||
emote: new BiActionInterpolant(() => this.hasAction('emote'), 0, crouchMaxTime), | |||
movements: new InfiniteActionInterpolant(() => { | |||
const ioManager = metaversefile.useIoManager(); |
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.
We could probably move the useIoManager call up to the top of the function and then re-use it
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.
I tried to move it up to the top of the function, but when doing so, metaversefile
somehow is only an empty EventTarget
object and useIoManager()
isn't defined. So I'll keep it as it is for now.
character-controller.js
Outdated
}, 0), | ||
movementsTransition: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.up || ioManager.keys.down || ioManager.keys.left || ioManager.keys.right || ioManager.keys.space || ioManager.keys.ctrl; | ||
}, 0, crouchMaxTime), |
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.
is crouchmaxtime right for swimming?
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.
crouchMaxTime
used more like a default value in existing codes.
But it should be better to rename to defaultMaxTime
.
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.
I will change crouchMaxTime
to defaultMaxTime
.
@patriboz Vertical swimming works fine. And I think should stick on surface until press Reference: https://youtu.be/prreEsPw1Qg You may need chat with @tcm390 on how to check if on surface. |
Looks like the "sinusoidal motion too vertically" issue caused by out of sync. Can try to sync, but maybe good to delete "sinusoidal motion" feature in this PR. |
Have not considered "vertical swimming due to camera angle". |
Implemented vertical swimming animations on keys SPACE and C.