ValkyrienSkies / Eureka

Basically Archimedes Ships, but with VS2 as the backend
Apache License 2.0
54 stars 32 forks source link

Helm applies weird inertia #324

Closed Amzd closed 2 months ago

Amzd commented 3 months ago

This issue occurs when only Valkyrien Skies and addons are installed and no other mods

Minecraft Version

1.20​

Mod Loader

Fabric

Issue description

I would like a boat that feels a bit more heavy but when you get on the helm, all boats basically feel the same. They accelerate and decelerate basically instantly when you press/release keys.

Quick solution might be to only take over the physics when a player is actually controlling. This means releasing W wouldn't instantly stop the boat.

https://github.com/ValkyrienSkies/Eureka/blob/156760618f7a6b17534ec130fd89fb768f77caaf/common/src/main/kotlin/org/valkyrienskies/eureka/ship/EurekaShipControl.kt#L171

-        if(player != null) {
+        // Only care about player with inputs
+        val hasInputs = player != null && (player.forwardImpulse != 0.0f || player.leftImpulse != 0.0f || player.upImpulse != 0.0f || player.sprintOn || player.cruise)
+        if (hasInputs) {

A better solution would be to take inertia into account instead of the WASD of the helm completely overriding any prior inertia.

Issue reproduction

on a helm while holding W: release W: boat stops instantly get off helm: boat stops after inertia runs out

Logs

No response

PriestOfFerns commented 3 months ago

This isn't a bug

Amzd commented 3 months ago

Hmm okay, not sure why this is the intended way but fine. Then this issue is a feature request.

millennIumAMbiguity commented 2 months ago

Duplicate of #204

Amzd commented 2 months ago

@millennIumAMbiguity Ah yea I didn't see that ticket, it is a duplicate, but that issue is tagged completed and had a linked PR? But the problem isn't fixed? Could you elaborate