X-Git-Url: https://git.r.bdr.sh/rbdr/sumo/blobdiff_plain/f45bcde17fe0a8849e647ac843106fb51d2e8971..7ade6f8d96825386bf2e89dea51f9297cbac8e9c:/lib/systems/physics_to_attributes.js 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; } }