Hello there !
So, I’m trying to implement a zoom function in my physics based game, scaling the whole thing. Unfortunately, my display objects are actually resized but the physics forms are not. Even if I insert everything in a whole new group.
This is basically what I have done, and it doesn’t work :
[lua]physics = require “physics”
physics.start();
physics.setDrawMode(“hybrid”)
local World = display.newGroup()
local square1 = display.newRect(0,0, 200,200)
square1:setFillColor(255,255,255,255)
physics.addBody(square1, “static”)
local square2 = display.newRect(300,300, 200,200)
square2:setFillColor(255,255,255,255)
physics.addBody(square2, “static”)
World:insert(square1)
World:insert(square2)
World:scale(0.2,0.2)[/lua]
I’ve understood the fact that Corona SDK doesn’t rescale physics body object… But, is there any way or workaround to do this ?
Thank you !