X-Git-Url: https://git.r.bdr.sh/rbdr/sumo/blobdiff_plain/493ec31cb19b4211c703762d14a4e6232c4c2143..bb8d5ef47baf7ad16a1bc58526f81ce332b090d6:/lib/systems/physics_to_attributes.js?ds=inline diff --git a/lib/systems/physics_to_attributes.js b/lib/systems/physics_to_attributes.js index a49a16b..e054710 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,8 +65,8 @@ 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; } }