Able to draw colliders
This commit is contained in:
@@ -3,6 +3,7 @@ from itertools import combinations
|
||||
|
||||
import pygame as pg
|
||||
|
||||
from tools import debug
|
||||
from collider import *
|
||||
from transform import Transform
|
||||
|
||||
@@ -49,6 +50,7 @@ class PhysicsSystem:
|
||||
body.velocity += g
|
||||
body.transform.position += dt * body.velocity
|
||||
body.transform.rotation += dt * body.angular_velocity
|
||||
debug.draw_collider(body.collider, body.transform)
|
||||
|
||||
for a, b in combinations(self.bodies, 2):
|
||||
if collision := intersect(a.collider, b.collider, a.transform, b.transform):
|
||||
|
||||
Reference in New Issue
Block a user