tortoise的3D动画

std::string fileName = "Sprite3DTest/tortoise.c3b";
	auto sprite = Sprite3D::create(fileName);
	sprite->setScale(0.8f);
	auto s = Director::getInstance()->getWinSize();
	sprite->setPosition(Vec2(s.width / 2.f + _radius * cosf(_accAngle), s.height / 2.f + _radius * sinf(_accAngle)));
	addChild(sprite);
	auto animation = Animation3D::create(fileName);
	if (animation)
	{
		auto animate = Animate3D::create(animation, 0.f, 1.933f);
		sprite->runAction(RepeatForever::create(animate));
	}

你可能感兴趣的:(tortoise的3D动画)