Hi,
i would like change the AnchorPoint
of a RenderTexture
like this
bool Canvas::init()
{
//////////////////////////////
// 1. super init first
if ( !Layer::init( ) )
{
return false;
}
// create a render texture, this is what we are going to draw into
_target = RenderTexture::create(704,554, Texture2D::PixelFormat::RGBA8888);
_target->retain();
_target->setAnchorPoint(Vec2(0,0));
_target->setPosition(Vec2());
this->addChild(_target, TERGET_ZORDER);
return true;
}
But, setAnchorPoint
doesn’t work, it always equals to Vec2::ANCHOR_MIDDLE
I’m using cocos2d-x V3.3
Please help me to do it.
Thanks