From f41a96c6669354ae49b6b5e42830d010571f8a36 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 14 Apr 2023 22:03:52 -0500 Subject: remove print statements from physics system and fix default physics interval --- honey/ecs-systems.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'honey/ecs-systems.lua') diff --git a/honey/ecs-systems.lua b/honey/ecs-systems.lua index 418f312..54bac89 100644 --- a/honey/ecs-systems.lua +++ b/honey/ecs-systems.lua @@ -158,7 +158,7 @@ end --===== physics =====-- physics = function(params) - local interval = params.interval or 0.01 + local interval = params.interval or 0.016 local groupSize = params.groupSize or 20 return { db=params.db, @@ -172,10 +172,6 @@ physics = function(params) local query = self.db:queryComponent("physics") for id, physics in pairs(query) do if not physics._body then - print("creating physics body for "..id) - for k,v in pairs(physics) do - print(k, v) - end physics._body = ode.BodyCreate(self.world) physics._gc = honey.util.gc_canary(function() print("releasing physics body for " .. id) @@ -192,30 +188,24 @@ physics = function(params) physics.mass.radius ) end - print('mass') ode.BodySetMass(physics._body, mass) local m = self.db:getComponent(id, "transform").matrix - print(m) - print('pos') ode.BodySetPosition( physics._body, m[1][4], m[2][4], m[3][4] ) - print('rot') ode.BodySetRotation( physics._body, m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3] ) - print('vel') ode.BodySetLinearVel( physics._body, physics.velocity[1], physics.velocity[2], physics.velocity[3] ) - print('lvel') ode.BodySetAngularVel( physics._body, physics.angularVelocity[1], -- cgit v1.2.1