Cocos2D 2.0 - masking a sprite
Posted
by
Desperate Developer
on Game Development
See other posts from Game Development
or by Desperate Developer
Published on 2012-06-26T08:39:47Z
Indexed on
2012/06/26
9:23 UTC
Read the original article
Hit count: 420
cocos2d-iphone
|cocos2d
I have read this tutorial about how to mask sprites using Cocos2D 2.0. http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0
But the author talks about OpenGL ES textures and vertices as they were common knowledge. My knowledge about OpenGl is zero raised to infinity.
All I want is to use a rectangle to mask a sprite to it. How I would do in Photoshop using a rectangle as mask (yes, I want to clip a sprite to the rectangle bounds and no, I do not want to use the ClippingNode solution, that do not works for animation/scaling etc.).
So, can you guys translate the klingon language used in this tutorial and tell how a solid rectangle can be used to mask a sprite in Cocos2D?
I am desperate, as my username states. I am searching this for a week and have tried several solutions without satisfactory results. Please help me.
Thanks!
© Game Development or respective owner