Skip to content
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

Discussion of CharacterBody behavior #50732

Open
8 of 9 tasks
Tracked by #45333
TokageItLab opened this issue Jul 22, 2021 · 8 comments
Open
8 of 9 tasks
Tracked by #45333

Discussion of CharacterBody behavior #50732

TokageItLab opened this issue Jul 22, 2021 · 8 comments

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Jul 22, 2021

Godot version

4.0

System information

Any

Issue description

This issue is a tracker that summarizes some of the issues that occur with the current physics behavior of CharacterBody.

Since the way characters are required to move varies from game to game, the implementation should be as minimalistic as possible.

The problems that occur can be divided into two categories: engine-side problems and user-side problems. However, even for user-side problems, it is possible to provide solutions as add-ons or tutorials. Then, I suggest that the implementation should try to be as uncomplicated as possible so that the user can understand what is going on.

I prepared a sample project that looks like this.

スクリーンショット 2021-07-22 20 42 45

Steps to reproduce

Play scene.

Minimal reproduction project

https://github.com/TokageItLab/3d-platform-test-for-godot4

@pouleyKetchoupp
Copy link
Contributor

For testing purpose, I've made a 3.x version of the same project that can be used to test backported features:
3d-platform-test-for-godot3-main.zip

It's mostly okay, but I had problems converting render meshes from 4.0 to 3.x so I had to recreate them and I took shortcuts so they are not all looking exactly the same. Physics and controls should be setup the same way.

@TokageItLab
Copy link
Member Author

TokageItLab commented Jul 31, 2021

@pouleyKetchoupp I opened two proposals for solving the collision between StaticBody and CharacterBody.
- Implement priority order of collision solving in StaticBody
- Implement is_inside_solid_geometry() in CharacterBody

@TokageItLab
Copy link
Member Author

TokageItLab commented Aug 10, 2021

@pouleyKetchoupp #30311 was closed, so I tested Moving-Slope. It no longer slid down, but I encountered two problems.

  • On the slope moving upward, the player speed is reduced (since the character's velocity is strange, I'll look into the problem in the PlayerController as well)
2021-08-11.5.12.41-1.mov
  • When the wall is close, the collision detection is very sketchy
2021-08-11.5.12.412-1.mov

@pouleyKetchoupp
Copy link
Contributor

@TokageItLab Thanks for testing and letting me know! I've noticed the one with the slowdown earlier today, I'm going to have a look to both.

@TokageItLab
Copy link
Member Author

TokageItLab commented Aug 19, 2021

@pouleyKetchoupp Currently, some methods such as get_slide_count() and get_floor_velocity() can't found in CharacterBody. Do you know what was the reason for it's removal and are there superseding?

Edited:
I found #51645, nice work @fabriceci !

@TokageItLab
Copy link
Member Author

TokageItLab commented Aug 19, 2021

@pouleyKetchoupp @fabriceci @fire Updated the sample project. The movement on the moving slope is now perfect. Excellent! However, the jittering slope problem still occurs in 3D.

And..., there is a regression where the CharacterBody (Player's toes?) is always buried in the floor. This was due to a change in the CapsuleCollider specification, so I fixed!
スクリーンショット 2021-08-19 9 20 29

@pouleyKetchoupp
Copy link
Contributor

@TokageItLab For the remaining jittering on the slope, I think it makes sense it's still there because #51027 was made just for 2D for now. We'll keep an eye on this case when porting those changes to 3D.

@TokageItLab
Copy link
Member Author

@pouleyKetchoupp @fabriceci In relation to the slope jittering, it reminded me of #51874.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants