thanks _memo
I’m impressed with the flipping physics objects. Was hoping for something out of the box though…
Now lots of the one i want to flip do not have physics e.g. people passing by.
I know about object:scale(-1,1) however my sprites come from a spritesheet so i need the whole sequence to be flipped.
I have about 50 sprites that i need to use both sides/ways so i’d like to avoid to have them duplicated in the spritesheet itself.
e.g.
local options = {width = 148, height = 124, numFrames = 40, sheetContentWidth = 1480, sheetContentHeight = 496}local peoplesheet = graphics.newImageSheet("people.png", options ) local sequenceData = { -- { name = "all", start=1, count=4, time=500, loopCount=2 }, { name = "pl\_std", frames={37,38,39,40,33,34}, time=500, loopCount=1 }, -- standing { name = "pl\_lef", frames={31,32,39,40,33,34}, time=500, loopCount=1 }, -- left, 1 { name = "pl\_rig", frames={31,32,39,40,33,34}, time=500, loopCount=1 }, -- right, 1 } for ip = 1,maxPeople do if ip % 2 == 0 then players[ip] = display.newSprite( peoplesheet, sequenceData ) players[ip].xScale = 0.4 ; players[ip].yScale = 0.4 ; players[ip]:setSequence( "pl\_lef" ) else players[ip] = display.newSprite( peoplesheet, sequenceData ) players[ip].xScale = 0.4 ; players[ip].yScale = 0.4 ; players[ip]:setSequence( "pl\_rig" ) end end