Skip to content

Conversation

@ThierryBerger
Copy link
Contributor

@ThierryBerger ThierryBerger commented Aug 5, 2024

Some numbers

offset is CharacterLength::Relative(0.01), then the height of the CharacterController in the exampple is 0.3, resulting in an exxaggerated offset (for aabb computation) of 0.0033. The nudge factor being 0.0001 shouldn´t impact that, but we're still in small numbers game. I think overshooting a bit won´t hurt much, especially if it fixes is_grounded reliability.

TODO?

I think I can make a test about ground prediction (make a character walking on a trimesh for some time, verify it's always grounded), but I fear this test might not always catch such bug.

Alternatives

We can consider exposing this offset multiplier, or the whole AABB used.

tested in windows and linux though, + character controller example no longer glimpses red, + still passes tests
@ThierryBerger ThierryBerger changed the title character offset exxageration to 1.2 ; number is out of my hat fix is_grounded character controller Aug 5, 2024
@ThierryBerger ThierryBerger changed the title fix is_grounded character controller fix character controller is_grounded Aug 5, 2024
@ThierryBerger ThierryBerger requested a review from sebcrozet August 7, 2024 08:08
Copy link
Member

@sebcrozet sebcrozet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be interesting to know why 1.1 didn’t work here, but let’s merge this as a stopgap solution. Thanks!

@ThierryBerger ThierryBerger merged commit 5542bc5 into dimforge:master Aug 9, 2024
@ThierryBerger
Copy link
Contributor Author

It would be interesting to know why 1.1 didn’t work here, but let’s merge this as a stopgap solution. Thanks!

@sebcrozet My behaviour analysis, with a capsule moving on a flat ground (character controller example)

It's frustrating that I can´t find why the capsule ends up being too high, but I'll give up on further analysis for now...

image

https://docs.google.com/presentation/d/1Uc9HEgNH0H3Mf9zvaiuNFCdopPnl50QVsyTkjxdK4po/edit?usp=sharing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants