paddle problem

This commit is contained in:
Ed
2024-11-12 23:21:33 +03:00
parent c33c655911
commit 3249bcfbcb
4 changed files with 12 additions and 5 deletions

View File

@@ -60,9 +60,9 @@ namespace Content.Server.Shuttles.Components
/// Damping applied to the shuttle's physics component when not in FTL.
/// </summary>
[DataField("linearDamping"), ViewVariables(VVAccess.ReadWrite)]
public float LinearDamping = 0.05f;
public float LinearDamping = 0.5f;//0.05f; //CP14 - the ocean is much denser than space, you know.
[DataField("angularDamping"), ViewVariables(VVAccess.ReadWrite)]
public float AngularDamping = 0.05f;
public float AngularDamping = 0.5f; //0.05f; //CP14 - the ocean is much denser than space, you know.
}
}

View File

@@ -7,5 +7,8 @@ namespace Content.Shared._CP14.Shuttle;
public sealed partial class CP14WaterShipPaddleComponent : Component
{
[DataField]
public float Power = 10f;
public float Power = 5f;
[DataField]
public Angle ImpulseAngle = Angle.FromDegrees(90f);
}

View File

@@ -59,7 +59,8 @@ public sealed class CP14WatershipSystem : EntitySystem
if (paddleTransform.GridUid is null)
return;
var impulseDirection = paddleTransform.LocalRotation.ToVec();
var direction = _transform.GetWorldRotation(paddleTransform) + ent.Comp.ImpulseAngle;
var impulseDirection = direction.ToVec();
_physics.ApplyLinearImpulse(paddleTransform.GridUid.Value, impulseDirection * ent.Comp.Power * modifier, paddleTransform.LocalPosition);
}

View File

@@ -41,6 +41,7 @@
- type: Anchorable
- type: Pullable
- type: CP14WaterShipPaddle
impulseAngle: 90
- type: entity
parent: CP14BaseWatershipPaddle
@@ -49,6 +50,7 @@
components:
- type: Sprite
state: wooden_l
- type: CP14WaterShipPaddle
- type: entity
parent: CP14BaseWatershipPaddle
@@ -56,4 +58,5 @@
suffix: Right
components:
- type: Sprite
state: wooden_r
state: wooden_r
- type: CP14WaterShipPaddle