Edward Starkov

Results 7 comments of Edward Starkov

I used this var friction = Friction * dt; PhysMath.RoundToZero(ref velocity, tolerance); velocity.X += velocity.X == 0 ? 0 : velocity.X > 0 ? -friction : friction; velocity.Y += velocity.Y...

Or this: velocity -= Vector2.Normalize(velocity) * friction;

one disadvantage is boxing/unboxing but it's possible to avoid that

Or turn structs into classes: public abstract class Shape { public abstract float GetArea(); public abstract void Move(Vec2 dVector); public abstract bool ContainsPoint(Vec2 point); } public class Circle : Shape...

I browsed some code of [BepuPhysics2](https://github.com/bepu/bepuphysics2). It's pretty advanced engine. It uses structs for shapes like box, triangle, capsule, etc. But these structs implement IConvexShape interface. So I think it...

aaaah Box != AABB, got it

Hello again! I rewrote the whole engine to ECS paradigm (instead of OOP), it can be interesting to you too, so I published it as fork.