valueerror Posted March 13, 2015 Share Posted March 13, 2015 thx in advance! Link to comment Share on other sites More sharing options...
valueerror Posted March 14, 2015 Author Share Posted March 14, 2015 i have a big tilesprite (tiling only vertical) and i need it to be mirrored on some occasions.. so everything on the right will be on the left. if i try the old trick to scale it around the x axis to -1 it just gets black.. is this even possible or is this something restricted to normal sprites? Link to comment Share on other sites More sharing options...
Westinghouse Posted March 14, 2015 Share Posted March 14, 2015 Use tileScale.x=-1 that should work. Link to comment Share on other sites More sharing options...
nkholski Posted March 14, 2015 Share Posted March 14, 2015 I noticed this too. My theory is that the x-position needs to be compensated, and that the tilesprite is mirrored to the left of the desired x-position. But its just a guess without looking into how it's coded.Edit: Missed the previous post. Hope that works. My post is on using tilesprite.scale.x = -1 Link to comment Share on other sites More sharing options...
valueerror Posted March 15, 2015 Author Share Posted March 15, 2015 hey... thank you both for your answers.. you're awesome.. this works (as nkholski said it is mirrored and the anchor is on the left side so i have to compensate for that...) ufer = game.add.tileSprite(worldwidth,0,worldwidth,worldheight,'ufer'); ufer.scale.x = -1;and westinghouse's approach also works ufer = game.add.tileSprite(0,0,worldwidth,worldheight,'ufer');ufer.tileScale.x=-1since both of your answers are correct i'm marking this one here (containing both solutions) as answer.. thx a lot! Link to comment Share on other sites More sharing options...
Recommended Posts