Hello, I am new to cocos2d (and objective-c).
I am trying to migrate a partially finished game from Unity3d to Cocos2d (for performance reasons). One thing I don't understand yet is how to achieve what I would call dynamic texture mapping.
For example, in my game in Unity I have a "S" shaped road with an object on it and as the user drags the object along the road the object takes the shape of the road's outline (it bends on the turns like it was fluid).
in my previous setup in Unity I had imported a "S" shaped 2d object (polyplane) from a 3d program like Cinema4d which consisted of 100 same sized polygons. Then, in Unity, I would apply a 50*200 px texture on it and I was able to change it's offset value during gameplay. So the texture was bended and slided around the shape' surface. This was easy to do there without any code.
So my questions with cocos2d are these:
1) How I create a "S" shaped sprite in cocos2d ?
2) Is it possible to properly map a x*y texture on a bended x*y shape like the letter "S"?
3) Is it possible to change the offset of the texture and make it "slide" along the bended shape?
4) If 1-3 are nonsense in a sprite-based platform, how would you approach the example with the road above in cocos2d. Is it possible at all?
Many thanks!