]> git.r.bdr.sh - rbdr/sumo/blobdiff - lib/systems/physics_to_attributes.js
Update dependencies
[rbdr/sumo] / lib / systems / physics_to_attributes.js
index a49a16bd7db8d5f70b68d5df1e23f27b5775be13..8daa57044ae8418b741e939e4eb6451421b83d8c 100644 (file)
@@ -1,6 +1,7 @@
 import { System } from '@serpentity/serpentity';
 
 import PhysicalWithAttributesNode from '../nodes/physical_with_attributes';
 import { System } from '@serpentity/serpentity';
 
 import PhysicalWithAttributesNode from '../nodes/physical_with_attributes';
+import Config from '../config';
 
 /**
  * Distribuets physics data to the related components
 
 /**
  * Distribuets physics data to the related components
@@ -64,9 +65,9 @@ export default class PhysicsToAttributesSystem extends System {
   update(currentFrameDuration) {
 
     for (const physicalEntity of this.physicalEntities) {
   update(currentFrameDuration) {
 
     for (const physicalEntity of this.physicalEntities) {
-      physicalEntity.position.x = physicalEntity.body.body.position.x;
-      physicalEntity.position.y = physicalEntity.body.body.position.y;
+      physicalEntity.position.x = physicalEntity.body.body.position.x * Config.meterSize;
+      physicalEntity.position.y = physicalEntity.body.body.position.y * Config.meterSize;
       physicalEntity.angle.angle = physicalEntity.body.body.angle;
     }
   }
       physicalEntity.angle.angle = physicalEntity.body.body.angle;
     }
   }
-};
+}