deprecated-3d-engine-prototype
deprecated-3d-engine-prototype copied to clipboard
SetPostion() in C3DSprite does not work
whatever the value u setted,the sprite always show in the same position(0,0,0)
@dfghj44444 Could you paste some pseudo-code to describe it?
@super626 Could you take a look of this issue?
//create fish
cocos3d::C3DSprite* fish = static_cast<C3DSprite*>(C3DRenderNodeManager::getInstance()->getResource("demores/haigui/haigui.ckb"));
fish->setId("haigui");
fish->addAnimationClip("idle", 0, 60, 0, 1.0f);
fish->scale(1.0f);
fish->setRotationX(90);
fish->setPositionX(400);//setPostion(400,0,0)will lead the same result
fish->playAnimationClip("idle");
fish->setPosition(0.0f, 0.0f, 0.0f);
_scene->addChild(fish);
Oh, please don't use this repo, use https://github.com/cocos2d/cocos2d-x instead.
does cocos2dx has contained the whole cocos3dx
cocos2d-x will not contain all the feature, because we are not implementing a full 3d engine.
ok,I'll try.For walking so far,maybe cant convert to cocos2dx,then I'll try fix it by myself.Thank u for answering.
hi,dear,you set the position twice.
first : fish->setPositionX(400);//setPostion(400,0,0)will lead the same result
second: fish->setPosition(0.0f, 0.0f, 0.0f);
sorry,I used an uncorrect case,but even after I deled the 2nd setPosition,the screen got no change.And in other cases,I can sure there just one setPostion,all the same,things always be shown on (0,0,0)