birb stab

This commit is contained in:
Lilith Schier 2026-06-08 21:53:05 +02:00
parent 00b76b6b25
commit 96bec5a6b7
11 changed files with 309 additions and 120 deletions

25
src/physics/Physics.cs Normal file
View file

@ -0,0 +1,25 @@
namespace Dancer;
public static class Physics
{
public const float PixelsPerMeter = 8f;
public const float PixelsPerMeterSquared = PixelsPerMeter * PixelsPerMeter;
public static Vector2 DragForce(Vector2 flowVelocity, float dragAmount = 0.01f)
{
return flowVelocity * flowVelocity.Abs() * dragAmount;
}
public static float DragAmount(float area = 1f, float dragCoefficient = 1.17f,
float fluidMassDensity = 1.2f / PixelsPerMeterSquared)
{
return 0.5f * fluidMassDensity * area * dragCoefficient;
}
}
public static class Extensions
{
extension(CharacterBody2D body)
{
}
}

View file

@ -0,0 +1 @@
uid://cxqgafpm35er5