mirror of https://github.com/axmolengine/axmol.git
Merge pull request #10006 from darkdukey/fixSprite3D
Fix Sprite3D not rendering 2d child correctly
This commit is contained in:
commit
c2e5f096d7
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue