-
Notifications
You must be signed in to change notification settings - Fork 494
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
Jitter when CharacterVirtual is standing on a diagonally downwards moving platform #1514
Comments
It is caused by The red line indicates the platform velocity, which is what the character will inherit:
It will currently, unconditionally, add gravity to that velocity (green):
So the resulting velocity will be the blue arrow. This means that the character will hit the platform slightly to the right of where it used to be standing and shift a little bit to the right. I can fix this particular case by moving the gravity calculation in the
which has the disadvantage that it takes 1 frame longer before gravity will kick in after the platform changes direction. This will make the scene look like this: 2025-02-16.20-26-32.mp4You can probably add some extra logic to detect platform velocity changes to get rid of the hops, but I really consider this 'game code' as everybody can make their own choices how this should behave. |
Thanks for the reply. Will try it out soon. |
Unfortunately that approach has its own problems - the character becoming unsupported from the ground in some situations on moving (and rotating) platforms. |
Are you using the 'stick to floor' feature? |
yeah |
Are you able to create a repro in the Samples app? The |
Here's an example of problems when gravity is only applied with character is not supported: It seems like something to do with interacting with complicated mesh geometry. I don't really want to try and make a repro in the samples app. |
Hi Jorrit, there's an issue when a CharacterVirtual is standing on a platform that is moving downwards but also sideways. See the following video:
jolt.diagonal.platform.jitter.mp4
Note that everything works fine as the platform moves up, but when moving down the avatar jitters sideways relative to the ground.
Patch to repro is to change line 630 of Samples\Tests\Character\CharacterBaseTest.cpp
to
mBodyInterface->MoveKinematic(mReversingVerticallyMovingBody, pos + Vec3(0, mReversingVerticallyMovingVelocity * 1.0f * inParams.mDeltaTime, mReversingVerticallyMovingVelocity * inParams.mDeltaTime), cReversingVerticallyMovingOrientation, inParams.mDeltaTime);
Cheers,
Nick
The text was updated successfully, but these errors were encountered: