Malmis1 / Recoil-Runner

Project for game development course.
2 stars 0 forks source link

Refine the player movement/shooting #5

Open Malmis1 opened 2 weeks ago

Malmis1 commented 2 weeks ago

Make changes to the movement and shooting that makes the overall movement more intuitive and responsive.

Various points to consider (ignore the crossed out points):

Malmis1 commented 2 weeks ago

I have created a new branch movement-weapon-test where I have experimented a bit with movement bd39d1f.

AdditiveRecoilAngleThreshold

I created a field additiveRecoilAngleThreshold in the WeaponController class.

The general idea is:

If the player shoots within this angle (the 250° in the picture), it will cause the velocity to be added to the current velocity the character is traveling in. If the player shoots outside of this angle (the 110° in the picture), the velocity will be reset first before then applying the recoil.

This approach aims to allow the player to always have the recoil launch the player in the opposite direction. Especially in the case where the player is already traveling quickly in a certain direction (such as falling). Then it will launch the player instead of just slowing the movement down.

Malmis1 commented 3 days ago

I have made some changes in the movement-weapon-test branch to how player movement works 4c06446. I changed the horizontal movement (inputting left and right) such that the rigidbody has force applied to it. This change is based on this answer.

The current changes addresses issue #7 and makes the overall controls feel a bit more refined in my opinion. There are however some new issues that needs to be fixed as a result of this: