Hi I'm looking to do the following: For a game, Create some effects based on the current view. The code needs to grab part of a view then manipulate it. One I need is "glass", so when the character walks behind the glass(or where the glass should be), the code will grab the image behind the glass and stretch it and reprint it where the glass should be, to give the effect of walking behind a lens.
What is the best way to do this?
I've never tried any thing like this before, so any help will be great!
I think you're asking about the image manipulation capabilities of the cocoa framework, in which case I reccomend looking into CoreImage:
The NSBox draws on top of the player view, the resulting composition gets a CIFilter (distortion) applied to it before drawing.