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

Added the 'change speed with scroll wheel' functionality of the freecam module to the flight module #4893

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrHello420
Copy link

@MrHello420 MrHello420 commented Sep 12, 2024

Type of change

  • Bug fix
  • New feature

Description

I added the 'change speed with scroll wheel' functionality that already exists in the freecam module to the flight module. I wanted this, so I made it :)

Related issues

You can't scroll your itembar while using the flight module with this feature on.

How Has This Been Tested?

I tested it on a local world, a modded fabric server and a vanilla server.
It works flawless on all tests.
It also behaves exactly like the already existing functionality in the freecam module because it is mostly copied.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Wide-Cat
Copy link
Collaborator

Instead of actually changing the value of the speed setting itself, it would be better to use another value to keep track of your speed, similar to how freecam does it. Set it to the value of the speed setting when the module is activated and modify that.

speedValue += event.value * 0.25 * (speedScrollSensitivity.get() * speedValue);

@MrHello420
Copy link
Author

Okay that makes sense, I will fix it when I have time.

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

Successfully merging this pull request may close these issues.

2 participants