matter-js icon indicating copy to clipboard operation
matter-js copied to clipboard

How to scale the world?

Open MaxMinimus opened this issue 1 year ago • 2 comments

How to scale the world to get the effect of raising the camera above the world?

I do this:

Composite.scale(engine.world, 0.01, 0.01, {x:0,y:0}, true)

but it doesn't work

MaxMinimus avatar Feb 09 '24 15:02 MaxMinimus

lookcenter={x:0,y:0}; Render.lookAt(render, { min: { x: lookcenter.x-render.options.width/2, y: lookcenter.y-render.options.height/2 }, max: { x: lookcenter.x+render.options.width/2, y: lookcenter.y+render.options.height/2 } }); For reference only.

MLH-AIDS avatar Feb 15 '24 17:02 MLH-AIDS

lookcenter={x:0,y:0}; Render.lookAt(render, { min: { x: lookcenter.x-render.options.width/2, y: lookcenter.y-render.options.height/2 }, max: { x: lookcenter.x+render.options.width/2, y: lookcenter.y+render.options.height/2 } }); For reference only.

does not work

MaxMinimus avatar Feb 21 '24 11:02 MaxMinimus