X-Git-Url: https://git.r.bdr.sh/rbdr/sumo/blobdiff_plain/493ec31cb19b4211c703762d14a4e6232c4c2143..7741a3cc37662ab2ff9606bdaffc0317b79a8dd9:/lib/systems/physics_to_attributes.js diff --git a/lib/systems/physics_to_attributes.js b/lib/systems/physics_to_attributes.js index a49a16b..8daa570 100644 --- a/lib/systems/physics_to_attributes.js +++ b/lib/systems/physics_to_attributes.js @@ -1,6 +1,7 @@ import { System } from '@serpentity/serpentity'; import PhysicalWithAttributesNode from '../nodes/physical_with_attributes'; +import Config from '../config'; /** * 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) { - 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; } } -}; +}