- CCActionInterval *actionTo = CCSkewTo::create(2, 70.0f, 0.0f);
- CCActionInterval *actionToBack = CCSkewTo::create(2, 0, 0);
- m_tamara->runAction(CCSequence::create(actionTo, actionToBack, NULL));
这3行简单代码,刚开始看了几次,都没看明白怎么扭的,后来用个红色矩阵来显示,才明白。
初始的时候。
运行代码后
扭曲y
- CCActionInterval *actionTo = CCSkewTo::create(2, 0.0f, 70.0f);
- CCActionInterval *actionToBack = CCSkewTo::create(2, 0, 0);
- m_tamara->runAction(CCSequence::create(actionTo, actionToBack, NULL));
![](https://img-my.csdn.net/uploads/201302/18/1361185417_3600.png)
这样就一目了然了,当skew的距离太大,整个四方形就成为一条直线,然后继续倾斜。