Jump to content

Can I use decal in WidgetSpriteNode viewport?


photo

Recommended Posts

I have a node with a decal(DecalOrtho) child inside, the decal show normally in main viewport, but can't be seen in WidgetSpriteNode viewport.

Dose WidgetSpriteNode support decals?

Link to comment

Hello!

3 hours ago, wang.pei said:

I have a node with a decal(DecalOrtho) child inside, the decal show normally in main viewport, but can't be seen in WidgetSpriteNode viewport.

Dose WidgetSpriteNode support decals?

May I clarify which SDK you are currently running? There should not be any issue with that in the actual 2.18 release. At least with our sample below everything proceeds as expected. Perhaps, some snippet from you could help to address this issue more precisely.

int AppWorldLogic::init()
{
	WidgetSpriteNodePtr sprite = WidgetSpriteNode::create(512, 256);
	sprite->setLifetime(Widget::LIFETIME_WORLD);
	WindowManager::getMainWindow()->addChild(sprite, Gui::ALIGN_LEFT);

	NodePtr node = World::getNodeByName("sphere");
	sprite->setNode(node);

	sprite->setCamera(Game::getPlayer()->getCamera());

	return 1;
}

image_2024_06_21T05_56_04_715Z.png

image_2024_06_21T05_56_30_338Z.png

Thanks!

Link to comment
×
×
  • Create New...