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

Add one item to readme #1

Closed
xyz2022 opened this issue Nov 17, 2022 · 4 comments
Closed

Add one item to readme #1

xyz2022 opened this issue Nov 17, 2022 · 4 comments

Comments

@xyz2022
Copy link

xyz2022 commented Nov 17, 2022

From the comment in the PlayerMovement.cs :

  • make sure whatever you want to be the ground in your game has the tag "Ground"

This will be good to have in the readme.md (which by the way is an awesome readme already!).

@B0N3head
Copy link
Owner

Yeah, had a comment on line 187 make sure whatever you want to be the ground in your game matches the tag below called "Ground" or change it to whatever you wantbut yeah, I doubt that many people would read that comment if it didn't work straight of the bat.

I'll add some quick images and whatnot to the readme, thanks for the feedback 👌

Along with this I'm back porting some stuff from an upcoming update to this version. Check out the dev branch for more (Currently broken and under dev atm, will push it soon).

@xyz2022
Copy link
Author

xyz2022 commented Nov 19, 2022

Along with this I'm back porting some stuff from an upcoming update to this version. Check out the dev branch for more (Currently broken and under dev atm, will push it soon).

That sounds real good. I've stumbled on some issues with isJumping and isGrounded (even after tagging the floor as Ground). I've been trying to debug it, but if the new version is coming soon I'll use the new version for sure.
I'm on unity 2021 LTS with a 3D Core URP default template. My hunch is that the issue is related to fixedupdate VS update.

@B0N3head
Copy link
Owner

The new update should fix a lot of those issues but I know what you are talking about.

The old movement ran solely on the OnCollisionEnter, which in specific edge cases (Rubbing up against a wall while midair then landing) wouldn't fire, so a raycast along with the collision detection was added as a soft patch while I'm working on the main update. Slope support, dynamic crouching to the height of the ceiling, a super stripped back version, etc, etc, etc

The old system only used OnCollisionEnter, this neither a fixedUpdate or update instead it uses "physics steps". Its just the frame rate that the physics run at. It isn't called every frame, but on "physics steps" when collision conditions are met. I could change it too OnCollisionStay to get it to run every frame but it would be pretty wasteful most of the time (Could do checks with use input to only check when necessary).

If you have any code that you wanna change cause, just send in pull request 👌

@B0N3head
Copy link
Owner

B0N3head commented Nov 22, 2022

Along with this I'm back porting some stuff from an upcoming update to this version. Check out the dev branch for more (Currently broken and under dev atm, will push it soon).

That sounds real good. I've stumbled on some issues with isJumping and isGrounded (even after tagging the floor as Ground). I've been trying to debug it, but if the new version is coming soon I'll use the new version for sure. I'm on unity 2021 LTS with a 3D Core URP default template. My hunch is that the issue is related to fixedupdate VS update.

Ive actually completely removed isJumping and isGrounded, idk what I was thinking when I programed that but they are legit the same just flipped. I'm honestly ashamed of the first version. It's not great but thanks for the kind words 👍

Also tried idiot proofing it a bit by having the ground raycast not check for tag/layer. Just so if someone uses it and somehow manages to skip the warnings, they will still have a "working" character.

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

No branches or pull requests

2 participants