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

rotation module improvement #3881

Merged
merged 2 commits into from
Sep 7, 2024
Merged

rotation module improvement #3881

merged 2 commits into from
Sep 7, 2024

Conversation

larryngton2
Copy link
Contributor

@larryngton2 larryngton2 commented Sep 5, 2024

implements part of #3524

@larryngton2
Copy link
Contributor Author

preview: https://streamable.com/ajucek

@larryngton2 larryngton2 marked this pull request as draft September 5, 2024 12:54
@larryngton2 larryngton2 changed the title added 3rd person rotation smoothing rotation module improvements Sep 5, 2024
@larryngton2 larryngton2 marked this pull request as ready for review September 5, 2024 13:07
@larryngton2 larryngton2 changed the title rotation module improvements rotation module improvement Sep 5, 2024
@1zun4
Copy link
Member

1zun4 commented Sep 5, 2024

It seems weird though. Can't know if it's render smoothing or slow rotations.

@larryngton2
Copy link
Contributor Author

larryngton2 commented Sep 5, 2024

It seems weird though. Can't know if it's render smoothing or slow rotations.

there is a toggle for it sooo idk
its meant to be used for instant rotations anyways

@1zun4 1zun4 added this to the 0.14.0 milestone Sep 6, 2024
Comment on lines 46 to 47
private val smoothRotations by boolean("SmoothRotations", false)
private val smoothingFactor by float("SmoothFactor", 0.15f, 0.1f..0.9f)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then make sure this is in a toggleable configurable at least, so it's "Smooth Rotation" -> "Factor". Make sure it's "Rotation", not "Rotations", so it matches the "ShowRotationVector"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll work on it when I get on my pc

Copy link
Member

@1zun4 1zun4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

Copy link
Contributor

@superblaubeere27 superblaubeere27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All possible complaints are already fixed

@@ -41,11 +41,14 @@ import net.minecraft.util.Pair

object ModuleRotations : Module("Rotations", Category.RENDER) {

val showRotationVector by boolean("ShowRotationVector", false)
private val showRotationVector by boolean("ShowRotationVector", false)
private val smoothRotations by boolean("SmoothRotation", false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is off by default 👍🏻

private fun smoothRotation(from: Rotation, to: Rotation): Rotation {
val diffYaw = to.yaw - from.yaw
val diffPitch = to.pitch - from.pitch
val smoothingFactor = 0.25f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smoothing factor is hardcoded as it should 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should have been a slider inside a toggleableconfigurable but i lost 99.9% of my braincells trying to move all of this shit to a class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bruh, just use a ToggleableConfigurable

@larryngton2
Copy link
Contributor Author

can we get even more approvals 🙏

@1zun4 1zun4 merged commit 5e595f4 into CCBlueX:nextgen Sep 7, 2024
2 checks passed
@larryngton2 larryngton2 deleted the better-rots branch September 8, 2024 10:51
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.

3 participants