deprecated-3d-engine-prototype icon indicating copy to clipboard operation
deprecated-3d-engine-prototype copied to clipboard

SetPostion() in C3DSprite does not work

Open dfghj44444 opened this issue 10 years ago • 9 comments

whatever the value u setted,the sprite always show in the same position(0,0,0)

dfghj44444 avatar Sep 30 '14 01:09 dfghj44444

@dfghj44444 Could you paste some pseudo-code to describe it?

minggo avatar Sep 30 '14 02:09 minggo

@super626 Could you take a look of this issue?

minggo avatar Sep 30 '14 02:09 minggo

//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);

dfghj44444 avatar Sep 30 '14 02:09 dfghj44444

Oh, please don't use this repo, use https://github.com/cocos2d/cocos2d-x instead.

minggo avatar Sep 30 '14 02:09 minggo

does cocos2dx has contained the whole cocos3dx

dfghj44444 avatar Sep 30 '14 02:09 dfghj44444

cocos2d-x will not contain all the feature, because we are not implementing a full 3d engine.

minggo avatar Sep 30 '14 02:09 minggo

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.

dfghj44444 avatar Sep 30 '14 02:09 dfghj44444

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);

houguohua avatar Sep 30 '14 07:09 houguohua

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)

dfghj44444 avatar Oct 13 '14 00:10 dfghj44444