-
Notifications
You must be signed in to change notification settings - Fork 85
More PhysX Character Handling #997
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
Closed
Closed
Conversation
This file contains hidden or 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
If you run-jump into the point where the lamps inside the Relto hut meet the wall, you get stuck falling against collisions that are >=90. This corrects some errors in the sliding logic to allow the player to slide down these colliders.
This prevents our forced position setting from (hopefully) triggering penetration into other colliders. Also, force the downward leg of the jump as well, which will generally prevent getting stuck on some (but not all) colliders.
This suppresses contacts with characters who seem to be stuck falling in place, which greatly improves the chance that the simulation will allow them to fall to the ground. Also, remove the friction from any collision that looks like a wall, which should reduce the liklihood of barely side-swiping a wall completely tanking your forward velocity.
Match the old PhysX 2.6.4 value for better semantics.
Observed a number of toe stubs where the previous values were too tight. Specifically, the Relto hut stairs and inside the Kahlo Pub.
A variation of this was used when making all the previous changes, I was just too sorry to commit it.
So, apparently, the getting stuck problems were all because our force of static friction was effectly equal and opposite the applied force of the character's movement in some situations. We really don't want that when running alongside walls, jumping onto objects, and sliding down cliffs. But we do want friction to help us not run out of the world. Tough balance!
Do we want to move? No friction. Do we want to stay put? Friction. This works really well in limited testing.
Previously, there were noticable hitches when the step-up feature engaged, especially on the Kadish X2 Vault stairs. This is because the step-up functionality was engaging in a way that would only take effect on the next render frame. This changes it to take effect on the current render frame, resulting in a smoother result.
That weird z-component math really just had the effect of not allowing gravity to stick us to the ground. So, it's removed and gravity has been supercharged when we're on the ground to (hopefully) keep us there.
This should correct issues where the player bounces up and down slightly in Chiso Prenvis and some tunnelling problems in Veelay.
The commit message was a lie. Overriding the current position like that does nothing.
Member
|
I tried running down the Great Stairs along the center carving, not the steps themselves. I found myself sliding down a chute at incredible speed... (The same thing can happen on the stairs if you manage to catch air for even a moment) |
The constant downward force on the avatar could cause a "bouncing" type movement when running across a flat plane. This is undesirable, but we do want to try to stick to stairs. So, I've retained the increased gravity-on-ground, with another increase to compensate.
Yeah, I know I previously reduced it. But the reason that was done has been fixed, and there are user reports of being able to get stuck behind the crates in the Kadish Vault.
Member
Author
|
@Deledrius minor revision made for descending staircases with abysmal framerate. |
If we're NOT on the ground, we want to enable infinite friction. Imagine that you are on a crappy system and running across the threshold of a staircase going down. The huge frame delta will result in your going "airborne" - without the friction force, you will skid down the stairs like it's made of ice!
Yeah, another tweak to the capsule size to prevent getting wedged into tight spots. This should really match the size of the old PhysX 2.6 CCT.
Merged
Member
Author
|
Closing in favor of #1127. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
More work to battle trouble points with the PhysX Character Handling. Specifically addressed: