Open Malmis1 opened 2 weeks ago
I have created a new branch movement-weapon-test
where I have experimented a bit with movement bd39d1f.
I created a field additiveRecoilAngleThreshold
in the WeaponController class.
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.
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:
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):
Make the player able to autofire the weapon (regardless of what type of weapon it is)AdjustResetVelocity
method in theWeaponController
class to avoid resetting movement