18 - Crouch #44

Merged
luizcarlos1405 merged 2 commits from crouch into master 2021-04-11 20:47:59 +02:00
luizcarlos1405 commented 2021-04-11 01:32:24 +02:00 (Migrated from github.com)

Solves #18

Crouch implemented for CapsuleShape and BoxShape. It's best if we merge this after #30 because I wrote it from that state.

  • Crouch with Ctrl
  • It makes you half the size (configurable in the player script)
  • Adjust the height for CpsuleShape and BoxShape. It'll throw an error if any other shape is used
  • More shapes can be implemented in the CollisionShapeBody's script (player scene)
  • Refactors how is_on_floor was detected and favor the built-in function is_on_floor of the KinematicBody.

crouch

Solves #18 Crouch implemented for CapsuleShape and BoxShape. It's best if we merge this after #30 because I wrote it from that state. * Crouch with Ctrl * It makes you half the size (configurable in the player script) * Adjust the height for CpsuleShape and BoxShape. It'll throw an error if any other shape is used * More shapes can be implemented in the CollisionShapeBody's script (player scene) * Refactors how `is_on_floor` was detected and favor the built-in function `is_on_floor` of the `KinematicBody`. ![crouch](https://user-images.githubusercontent.com/15899938/114287345-841adb80-9a3c-11eb-84b8-053234a6948e.gif)
CombustibleLemonade commented 2021-04-12 15:52:09 +02:00 (Migrated from github.com)

One thing we noticed is that the refactoring of the is_on_floor code reintroduced several bugs related to the built in function - namely, sliding on ramps while standing still, and getting a downward boost when walking off of a platform.

One thing we noticed is that the refactoring of the is_on_floor code reintroduced several bugs related to the built in function - namely, sliding on ramps while standing still, and getting a downward boost when walking off of a platform.
luizcarlos1405 commented 2021-04-14 20:31:28 +02:00 (Migrated from github.com)

Oh.. I thought I had tested enough. I can remake it the other way the next weekend.

Oh.. I thought I had tested enough. I can remake it the other way the next weekend.
luizcarlos1405 commented 2021-04-14 21:05:47 +02:00 (Migrated from github.com)

@CombustibleLemonade I got a pause at work and did a quick look. I fixed it and tried to explain how I fixed it in this video: https://youtu.be/WT0zFvcNgdA

@CombustibleLemonade I got a pause at work and did a quick look. I fixed it and tried to explain how I fixed it in this video: https://youtu.be/WT0zFvcNgdA
CombustibleLemonade commented 2021-04-14 21:29:23 +02:00 (Migrated from github.com)

Thank you for the explanation! That still leaves the being thrown downward when walking off of a cliff, but I think we'll have to use raycasts to check if there is a cliff if we want to solve this properly. Also, 21:9 aspect ratios are no problem! I have such a monitor too.
image

Thank you for the explanation! That still leaves the being thrown downward when walking off of a cliff, but I think we'll have to use raycasts to check if there is a cliff if we want to solve this properly. Also, 21:9 aspect ratios are no problem! I have such a monitor too. ![image](https://user-images.githubusercontent.com/3164190/114767844-75983100-9d68-11eb-9c13-40e2f3a4c61e.png)
luizcarlos1405 commented 2021-04-14 21:35:36 +02:00 (Migrated from github.com)

I think somehow the velocity is accumulating downwards. I can look into it later! Oh, my monitor is also from LG although another model. Hehe 21:9 gang

I think somehow the velocity is accumulating downwards. I can look into it later! Oh, my monitor is also from LG although another model. Hehe 21:9 gang
This repo is archived. You cannot comment on pull requests.
There is no content yet.