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

should allow grounding with no movement counter to the up direction #481

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ChrisJanssens
Copy link

It looks like we are taking the dot product of the movement and up direction here to ensure the vector is negative to the up direction. Is this necessary? I was using grounded to determine when my character controller can "jump". Allowing this value to be zero or lower allows my character controller lateral movement along a collider that is on the opposed side of my character to that of the up direction.

@Vrixyz
Copy link
Contributor

Vrixyz commented May 29, 2024

in practice you probably still want to apply a gravity toward the "ground" ? So I'm not sure this matters much ; but an epsilon isn't needed I think indeed.

@Vrixyz
Copy link
Contributor

Vrixyz commented Aug 2, 2024

While I think this makes sense, more context about this code can be found here:

The commit message is explicitly about forbidding exactly horizontal movement, I'm not sure wheteher it's fully thought out, or was done only to follow the epsilon "mindset" which was already here before. Tagging @janhohenheim if you're around and able clarify ? 🥺

@janhohenheim
Copy link
Contributor

janhohenheim commented Aug 2, 2024

@Vrixyz I remember doing that, but I don't remember my reasoning. Tending towards following the epsilons that were already present.
If it's inconvenient, feel free to revert it :)

@Vrixyz
Copy link
Contributor

Vrixyz commented Aug 12, 2024

I still agree with this change, but this only adds a fix when snapping is enabled, so we'll need to gather more information about it before validating.

This PR #715 explores alternatives (or additions)

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

Successfully merging this pull request may close these issues.

3 participants