Merge pull request #10006 from darkdukey/fixSprite3D

Fix Sprite3D not rendering 2d child correctly
This commit is contained in:
minggo 2015-01-15 09:33:23 +08:00
commit c2e5f096d7
2 changed files with 9 additions and 1 deletions

View File

@ -630,7 +630,7 @@ void Sprite3D::visit(cocos2d::Renderer *renderer, const cocos2d::Mat4 &parentTra
}
uint32_t flags = processParentFlags(parentTransform, parentFlags);
flags &= FLAGS_RENDER_AS_3D;
flags |= FLAGS_RENDER_AS_3D;
//
Director* director = Director::getInstance();

View File

@ -128,6 +128,14 @@ CameraRotationTest::CameraRotationTest()
_camNode->setPositionZ(Camera::getDefaultCamera()->getPosition3D().z);
_camControlNode->addChild(_camNode);
auto sp3d = Sprite3D::create();
sp3d->setPosition(s.width/2, s.height/2);
addChild(sp3d);
auto lship = Label::create();
lship->setString("Ship");
lship->setPosition(0, 20);
sp3d->addChild(lship);
//Billboards
//Yellow is at the back