From 700bc981a9735864abb69bd4d6b72dacf8b2c55b Mon Sep 17 00:00:00 2001 From: WallopingEwe <53689141+WallopingEwe@users.noreply.github.com> Date: Sun, 28 Dec 2025 16:53:20 -0600 Subject: [PATCH 1/3] Remove the arbitrary 50x multiplier for the force input. It doesn't explain anywhere that it multiplies the force by 50. This hurts making precise forces unless you know to divide the force by 50. Even then it multiplies it after the check for the maximum force. On the regular thruster I removed some unnecessary WorldToLocalVectors to just apply the force globally instead of locally since we already have it global. I have tested it in game and it works for me. --- lua/entities/gmod_wire_thruster.lua | 10 +++++----- lua/entities/gmod_wire_vectorthruster.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/entities/gmod_wire_thruster.lua b/lua/entities/gmod_wire_thruster.lua index 8bbf4fdafa..13f9ad389e 100644 --- a/lua/entities/gmod_wire_thruster.lua +++ b/lua/entities/gmod_wire_thruster.lua @@ -122,7 +122,7 @@ function ENT:SetForce( force, mul ) end if self.neteffect then - self.effectforce = self.ThrustOffset:Length() * self.force * self.mul * 50 + self.effectforce = self.ThrustOffset:Length() * self.force * self.mul self.updateeffect = true end @@ -134,13 +134,13 @@ function ENT:SetForce( force, mul ) end function ENT:CalcForce(phys) - local ThrusterWorldForce = phys:LocalToWorldVector( self.ThrustOffset ) * (self.force * self.mul * -50) + local ThrusterWorldForce = phys:LocalToWorldVector( self.ThrustOffset ) * (self.force * -self.mul) -- Calculate the velocity local ForceLinear, ForceAngular = phys:CalculateVelocityOffset(ThrusterWorldForce, phys:LocalToWorld( self.ThrustOffset )) - self.ForceLinear = phys:WorldToLocalVector(WireLib.clampForce(ForceLinear)) - self.ForceAngular = phys:WorldToLocalVector(WireLib.clampForce(ForceAngular)) + self.ForceLinear = WireLib.clampForce(ForceLinear) + self.ForceAngular = WireLib.clampForce(ForceAngular) end function ENT:SetDatEffect(uwater, owater, uweffect, oweffect) @@ -241,7 +241,7 @@ function ENT:PhysicsSimulate( phys, deltatime ) self:CalcForce(phys) - return self.ForceAngular, self.ForceLinear, SIM_LOCAL_ACCELERATION + return self.ForceAngular, self.ForceLinear, SIM_GLOBAL_ACCELERATION end function ENT:Switch( on, mul ) diff --git a/lua/entities/gmod_wire_vectorthruster.lua b/lua/entities/gmod_wire_vectorthruster.lua index ddb9c6da99..135c6bb73d 100644 --- a/lua/entities/gmod_wire_vectorthruster.lua +++ b/lua/entities/gmod_wire_vectorthruster.lua @@ -165,7 +165,7 @@ function ENT:CalcForce(phys) if ThrustLen>0 then local ThrustNormal = ThrusterWorldForce/ThrustLen self:SetNormal( -ThrustNormal ) - self.ForceLinear, self.ForceAngular = phys:CalculateVelocityOffset( ThrustNormal * ( math.min( self.force * self.mul, self.force_max ) * 50 ), phys:LocalToWorld( self.ThrustOffset ) ) + self.ForceLinear, self.ForceAngular = phys:CalculateVelocityOffset( ThrustNormal * ( math.min( self.force * self.mul, self.force_max ) ), phys:LocalToWorld( self.ThrustOffset ) ) self.ForceLinear = WireLib.clampForce(self.ForceLinear) self.ForceAngular = WireLib.clampForce(self.ForceAngular) From 902bc7bbd233839a2e19e8b441add06ea0e93e75 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 15 Jan 2026 19:19:49 +0300 Subject: [PATCH 2/3] Revert some changes --- lua/entities/gmod_wire_thruster.lua | 2 +- lua/entities/gmod_wire_vectorthruster.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_thruster.lua b/lua/entities/gmod_wire_thruster.lua index 13f9ad389e..e48eddc950 100644 --- a/lua/entities/gmod_wire_thruster.lua +++ b/lua/entities/gmod_wire_thruster.lua @@ -134,7 +134,7 @@ function ENT:SetForce( force, mul ) end function ENT:CalcForce(phys) - local ThrusterWorldForce = phys:LocalToWorldVector( self.ThrustOffset ) * (self.force * -self.mul) + local ThrusterWorldForce = phys:LocalToWorldVector( self.ThrustOffset ) * (self.force * self.mul * -50) -- Calculate the velocity local ForceLinear, ForceAngular = phys:CalculateVelocityOffset(ThrusterWorldForce, phys:LocalToWorld( self.ThrustOffset )) diff --git a/lua/entities/gmod_wire_vectorthruster.lua b/lua/entities/gmod_wire_vectorthruster.lua index 135c6bb73d..ddb9c6da99 100644 --- a/lua/entities/gmod_wire_vectorthruster.lua +++ b/lua/entities/gmod_wire_vectorthruster.lua @@ -165,7 +165,7 @@ function ENT:CalcForce(phys) if ThrustLen>0 then local ThrustNormal = ThrusterWorldForce/ThrustLen self:SetNormal( -ThrustNormal ) - self.ForceLinear, self.ForceAngular = phys:CalculateVelocityOffset( ThrustNormal * ( math.min( self.force * self.mul, self.force_max ) ), phys:LocalToWorld( self.ThrustOffset ) ) + self.ForceLinear, self.ForceAngular = phys:CalculateVelocityOffset( ThrustNormal * ( math.min( self.force * self.mul, self.force_max ) * 50 ), phys:LocalToWorld( self.ThrustOffset ) ) self.ForceLinear = WireLib.clampForce(self.ForceLinear) self.ForceAngular = WireLib.clampForce(self.ForceAngular) From 512c18147a01e06db7f7c9a7f46aba2bcd9cc476 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 15 Jan 2026 19:24:38 +0300 Subject: [PATCH 3/3] Revert more --- lua/entities/gmod_wire_thruster.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_thruster.lua b/lua/entities/gmod_wire_thruster.lua index e48eddc950..4d3272075c 100644 --- a/lua/entities/gmod_wire_thruster.lua +++ b/lua/entities/gmod_wire_thruster.lua @@ -122,7 +122,7 @@ function ENT:SetForce( force, mul ) end if self.neteffect then - self.effectforce = self.ThrustOffset:Length() * self.force * self.mul + self.effectforce = self.ThrustOffset:Length() * self.force * self.mul * 50 self.updateeffect = true end