flying-balls/collisions.h
Karma Riuk a424fec9a9 Now when polygons collide, they get moved by the overlap to ensure that
they don't get stuck in the following frames, it works very well and
Carza is happy :))))))
2023-05-19 15:24:11 +02:00

17 lines
291 B
C

#ifndef COLLISIONS_H_INCLUDED
#define COLLISIONS_H_INCLUDED
#include "polygons.h"
#include "vec2d.h"
struct collision {
bool collides = false;
vec2d n;
vec2d impact_point;
vec2d overlap; // minimum push vector
};
extern collision collides(polygon& p, polygon& q);
#endif