I am trying to use this, but I have problems with any scale factor other than 1:
local obj = display.newGroup();
local suffix = "";
local displayScale = display.contentScaleX;
print("scale: " .. displayScale)
if displayScale \< 1 then --this way it scales for iPad as well as iPhone
suffix = "@2x"
end
local catSprites = spriteGrabber.grabSheet("catsprites"..suffix);
local cat = catSprites:grabSprite("",true,{run={1,8,1000,0}});
cat.x, cat.y = 0 , 0;
obj:insert(cat);
cat(0,0,displayScale,"c") --also tried "tl"
cat("run");
If I manually set displayScale to 1, the animation plays fine. But if I let the simulator set it (which will give 0.46875 for the iPad), the sprite animation plays, but also bobs up and down while it’s animating. It stays in place if displayScale = 1. Why would this happen?
All of the images in the sprite sheet have the same spriteSourceSize. [import]uid: 52127 topic_id: 10938 reply_id: 310938[/import]