Replace managed physics with Box3D runtime boundary
This commit is contained in:
parent
658db6c986
commit
721eee0656
26 changed files with 2167 additions and 200 deletions
|
|
@ -18,7 +18,10 @@ public sealed record PhysicsBody(
|
|||
float Radius,
|
||||
float Mass,
|
||||
bool IsStatic = false,
|
||||
float Restitution = 0.2f);
|
||||
float Restitution = 0.2f,
|
||||
Vec2? Direction = null,
|
||||
float AngularVelocity = 0.0f,
|
||||
float Torque = 0.0f);
|
||||
|
||||
public sealed record RadialField(
|
||||
string Id,
|
||||
|
|
@ -46,3 +49,31 @@ public sealed record ContactEvent(
|
|||
public sealed record SimulationStepResult(
|
||||
YmirWorld World,
|
||||
IReadOnlyList<ContactEvent> Contacts);
|
||||
|
||||
public sealed record CircleCastQueryRequest(
|
||||
Vec2 Origin,
|
||||
Vec2 Direction,
|
||||
float Distance,
|
||||
float Radius,
|
||||
IReadOnlyList<PhysicsBody> Bodies);
|
||||
|
||||
public sealed record CircleCastHit(
|
||||
string BodyId,
|
||||
Vec2 Point,
|
||||
Vec2 Normal,
|
||||
float Distance);
|
||||
|
||||
public sealed record CircleCastQueryResult(IReadOnlyList<CircleCastHit> Hits);
|
||||
|
||||
public sealed record CircleOverlapQueryRequest(
|
||||
Vec2 Center,
|
||||
float Radius,
|
||||
IReadOnlyList<PhysicsBody> Bodies);
|
||||
|
||||
public sealed record CircleOverlapHit(
|
||||
string BodyId,
|
||||
Vec2 Point,
|
||||
Vec2 Normal,
|
||||
float Distance);
|
||||
|
||||
public sealed record CircleOverlapQueryResult(IReadOnlyList<CircleOverlapHit> Hits);
|
||||
|
|
|
|||
Loading…
Reference in a new issue