diff --git a/cocos/2d/CCActionCamera.cpp b/cocos/2d/CCActionCamera.cpp index 6ecc0999ca..f281885c55 100644 --- a/cocos/2d/CCActionCamera.cpp +++ b/cocos/2d/CCActionCamera.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org +Copyright (c) 2010-2013 cocos2d-x.org Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011 Zynga Inc. @@ -124,6 +124,13 @@ void ActionCamera::updateTransform() kmMat4Multiply(&mv, &mv, &t); } + // XXX FIXME TODO + // Using the AdditionalTransform is a complete hack. + // This should be done by multipliying the lookup-Matrix with the Node's MV matrix + // And then setting the result as the new MV matrix + // But that operation needs to be done after all the 'updates'. + // So the Director should emit an 'director_after_update' event. + // And this object should listen to it _target->setAdditionalTransform(mv); } diff --git a/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp b/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp index 1b719160b0..ff70e66f66 100644 --- a/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp @@ -4,8 +4,6 @@ static std::function createFunctions[] = { - CL(ActionOrbit), - CL(ActionManual), CL(ActionMove), CL(ActionRotate), @@ -330,16 +328,17 @@ void ActionRotationalSkew::onEnter() this->centerSprites(3); - auto actionTo = RotateTo::create(2, 37.2f, -37.2f); + auto actionTo = RotateTo::create(2, 180, 180); auto actionToBack = RotateTo::create(2, 0, 0); - auto actionBy = RotateBy::create(2, 0.0f, -90.0f); - auto actionBy2 = RotateBy::create(2, 45.0f, 45.0f); + auto actionBy = RotateBy::create(2, 0.0f, 360); auto actionByBack = actionBy->reverse(); - _tamara->runAction( Sequence::create(actionTo, actionToBack, NULL) ); - _grossini->runAction( Sequence::create(actionBy, actionByBack, NULL) ); + auto actionBy2 = RotateBy::create(2, 360, 0); + auto actionBy2Back = actionBy2->reverse(); - _kathia->runAction( Sequence::create(actionBy2, actionBy2->reverse(), NULL) ); + _tamara->runAction( Sequence::create(actionBy, actionByBack, NULL) ); + _grossini->runAction( Sequence::create(actionTo, actionToBack, NULL) ); + _kathia->runAction( Sequence::create(actionBy2, actionBy2Back, NULL) ); } std::string ActionRotationalSkew::subtitle() const