samme Posted August 4, 2016 Share Posted August 4, 2016 (1) an asteroid texture (2) a shadow texture (3) shadow covers asteroid (4) asteroid rotates but shadow doesn't shadow clips to asteroid's outline (5, 6) at its current rotation (7) end result I'm stuck at #5–6. Ideas? drhayes 1 Link to comment Share on other sites More sharing options...
symof Posted August 4, 2016 Share Posted August 4, 2016 What do you mean by no.5 , can you please elaborate? This is what I understand by clipping http://phaser.io/examples/v2/bitmapdata/alpha-mask Link to comment Share on other sites More sharing options...
samme Posted August 4, 2016 Author Share Posted August 4, 2016 Hi symof, I mean that the shadow should be clipped to the asteroid (panels 6–7) instead of overflowing it (panels 3–4). It's like http://phaser.io/examples/v2/bitmapdata/alpha-mask but I need to rotate the mask continuously without rotating the shadow texture beneath it. Link to comment Share on other sites More sharing options...
symof Posted August 5, 2016 Share Posted August 5, 2016 You use a mask to crop it. The outline(alpha mask of the asteroid) would need to be made in advance. Or you could make it with graphics. http://phaser.io/examples/v2/sprites/mask Link to comment Share on other sites More sharing options...
samme Posted August 6, 2016 Author Share Posted August 6, 2016 Will try, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts