Skip to content

Feat:Adds Line Lock Module#317

Open
PoTheMagicDragon wants to merge 4 commits into
lambda-client:1.21.11from
PoTheMagicDragon:line-lock
Open

Feat:Adds Line Lock Module#317
PoTheMagicDragon wants to merge 4 commits into
lambda-client:1.21.11from
PoTheMagicDragon:line-lock

Conversation

@PoTheMagicDragon

@PoTheMagicDragon PoTheMagicDragon commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

An alternative to rotation lock. Instead of locking your rotation to a certain angle, it locks it towards a line. That way when you bump pigmen on the highway, you realign to the middle instead of getting pushed off to the side.

This comment explains the functionality pretty clearly

		//  When enabled we lock onto a straight "rail" and steer the camera down it:
		//
		//        lineOrigin ●─────────●──────────►  lineDirection (the way the rail points)
		//                            ╱ closestPoint (rail spot nearest you)
		//                    you ●──╯                → we aim a bit further down the rail
		//                                              (lookaheadPoint) so you curve back on

@github-project-automation github-project-automation Bot moved this to Backlog in Kanban Jul 15, 2026
@beanbag44
beanbag44 self-requested a review July 20, 2026 14:51

@beanbag44 beanbag44 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The movement based snapping probably doesnt need to be used here. If the direction is defined by the starting rotation and snapping, then that can be used to angle everything. The only reason its done using movement in obstacle passing efly's is because the user might not be using a rotation lock. Its not needed here as the module is rotation locking

Comment thread src/main/kotlin/com/lambda/module/modules/player/LineLock.kt Outdated
description = "Locks the player's yaw to a line and steers toward a point ahead on the line",
tag = ModuleTag.Companion.PLAYER,
) {
private const val YAW_SNAP_INCREMENT = 45.0 // snap the axis to the nearest 45° heading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think it'd be nice to have some of these as settings. For example, bounce efly has the step as a setting so you can ensure that no matter what angle the highway is built at, it will always be configurable to snap in the right direction

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Which ones? I left a lot of these out to keep the interface simple so there's a shallow learning curve for using it.

Comment thread src/main/kotlin/com/lambda/module/modules/player/LineLock.kt Outdated
@PoTheMagicDragon

Copy link
Copy Markdown
Contributor Author

The movement based snapping probably doesnt need to be used here. If the direction is defined by the starting rotation and snapping, then that can be used to angle everything. The only reason its done using movement in obstacle passing efly's is because the user might not be using a rotation lock. Its not needed here as the module is rotation locking

What do you mean by movement based snapping?

@beanbag44

Copy link
Copy Markdown
Member

What do you mean by movement based snapping?

The direction calculation based on line origin and current player position

@PoTheMagicDragon

Copy link
Copy Markdown
Contributor Author

The direction calculation based on line origin and current player position

Still not sure I follow. What function/line number are you talking about?

@beanbag44

Copy link
Copy Markdown
Member

Still not sure I follow. What function/line number are you talking about?

Reading it again i was mistaken, my bad

@beanbag44

Copy link
Copy Markdown
Member

noticed there was a reference to ConfigEditor.hideAllExcept though. Best to directly import hideAllExcept and remove the ConfigEditor. prefix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants