changed other type of collision to PhysicsEntity and added separation force

This commit is contained in:
Sara 2023-10-07 18:39:57 +02:00
parent 39625789e2
commit 8c78395219

View file

@ -2,17 +2,19 @@
#define _fencer_collision_h
#include "shape.h"
#include "physics_entity.h"
#include <stddef.h>
struct Collision {
Shape* other;
typedef struct Collision {
PhysicsEntity other;
Vector point;
Vector normal;
Vector velocity;
Vector separation_force;
size_t edge_left;
size_t edge_right;
};
} Collision;
extern Collision get_collision(PhysicsEntity a, PhysicsEntity b);
#endif // !_fencer_collision_h