I am creating a game with a bunch of physics objects in a group that come from sprite sheets. My goal is to have a scene that is 2 times as big as the device and have the ability to scroll around and have the camera follow the hero. I have placed all my objects into a display group and then zoomed in by saying
Gamegroup.xScale = 2 and Gamegroup.yScale = 2
This seems to work and even the physics objects seem to scale correctly as I zoom in and out. However, when I zoom in my images get blurry. Before, I started switching to sprites I was using newimagerect and it allows you to state a size of the image. So I was taking a bigger image and scaling it down when I created it with newimagerect. When zooming the image stayed perfectly clear. I guess because the image was really much bigger than the presented size. How do people handle this normally? I can’t be the first. I tried scaling the image down after I created it but physics doesn’t seem to scale with me. This is what I tried. I put a test button on the screen and when I touched it the newfish changed scale.
local function touch_test (event)
if event.phase == “ended” then
– testsubject do something to test subject
local newfish = testsubject
physics.removeBody(newfish.image)
newfish.image.xScale = .5
newfish.image.yScale = .5
physics.addBody(newfish.image, “dynamic”, { friction=0.0, bounce=0.0, density=1 , filter = newfish.CF , outline=newfish.imageoutline} )
end
return
end
From what i have read this should work but so far I have been unsuccessful. If there is a better way please enlighten me. I need enlightened.
Just so you know this did fix the blurry issue. It just created a physics problem.
Thanks Sweet