Cannot rotate image independent of mask

Cross posting from developer forum , but it really is a show stopper for me in terms of being able to achieve the visual effect I want and I can’t think of a work around.

I am trying trying to rotate an image under it’s mask - But have the mask stay static.

At the moment the mask seems to move in sync with the image. My code is as follows :

[lua]local portalMask = graphics.newMask( “portal_mask.png” )

local portal = display.newImage( “portal.png” )
portal:setMask(portalMask)

local enterFrameListener = function( event )
portal:rotate(1)
end[/lua]

I notice there is also a image.maskRotation = XX method but I don’t I could use this to resolve the situation.

Am I doing something incorrectly? Or bug? [import]uid: 118687 topic_id: 21619 reply_id: 321619[/import]

I guess you would have to rotate the mask in the opposite direction
something like this ( I didn’t test it )

[lua]local portalMask = graphics.newMask( “portal_mask.png” )

local portal = display.newImage( “portal.png” )
portal:setMask(portalMask)

local enterFrameListener = function( event )
portal.rotation = portal.rotation + 1
portal.maskRotation = portal.maskRotation - 1
end [import]uid: 13632 topic_id: 21619 reply_id: 85734[/import]

That works perfectly! Thankyou! [import]uid: 118687 topic_id: 21619 reply_id: 85760[/import]

That works perfectly! Thankyou! [import]uid: 118687 topic_id: 21619 reply_id: 85762[/import]