Hertzole / gold-player

A first person player controller for Unity.
MIT License
160 stars 16 forks source link

Cannot jump when up against any kind of wall collider... #42

Closed HendawgPlayz closed 2 years ago

HendawgPlayz commented 2 years ago

Hi again! I've found that whenever I use this player controller I always run into the same issue. Whenever I have the player walk up against any object and jump, the player tries to jump but is very quickly launched downwards before the full jump can even occur. This also happens when jumping towards a ledge that you do not have enough height to climb, it will simply launch you down to the ground. I have had this happen to me on numerous unity projects and I have never found the issue. I can import the base gold player controller into the game and this issue happens right out of the box without my making any changes and I was hoping for some help. Thank you very much and sorry for the trouble! I can provide videos if you like but I'm sure it is easily replicable on your system lol. I'm confused as to why this problem has never been reported though so I'm not sure what this could be...

Hertzole commented 2 years ago

Hi!

Thank you for the report! Could you please provide a small video of what you're describing so I can see exactly what's going on? I know of some weirdness with ledges but I just want to be sure I'm thinking of the right thing.

HendawgPlayz commented 2 years ago

https://user-images.githubusercontent.com/45043731/148076880-2a81d353-0280-46aa-a0c0-889cf41d8478.mp4

There you are! Keep in mind this can be replicated with a blank Unity project and blank player controller but I decided to use one of my current projects just to show you. I appreciate the help! Have a wonderful day!

Hertzole commented 2 years ago

Thank you for the video!

It seems like your scale on the player is not set to 1,1,1. It needs to be uniform due to both how the player controller is built and how the Unity character controller works.

If you want to scale any visual elements of the player, I recommend creating a "Graphics" object as a child of the player object and scaling that.

If you want to change the size of the player, you'll need to change the radius and height on the character controller component.

I've also added a new little warning box in the editor to help prevent this in the future too. (currently only in the dev branch)

I hope this helps. :)