Skip to content

Commit

Permalink
Added node in attachAstroChild
Browse files Browse the repository at this point in the history
Now the function attachAstroChild behaves more like
attachMeshSphereCoord
  • Loading branch information
giogix2 committed Aug 17, 2016
1 parent 632ec14 commit 44b9a92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions PSphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,12 +801,16 @@ void PSphere::attachAstroChild(PSphere *object)
secNodeName = secNodeName + objectMeshName;
nodeObjectName = nodeObjectName + objectMeshName;
Ogre::SceneNode *nodeSecondary = this->node->createChildSceneNode(secNodeName);
Ogre::SceneNode *nodeAstroChild = nodeSecondary->createChildSceneNode(objectMeshName);
// nodeSecondary->addChild(nodeObject);
nodeSecondary->createChildSceneNode(nodeObjectName);
nodeSecondary->attachObject(entity);
nodeAstroChild->createChildSceneNode(nodeObjectName);
nodeAstroChild->attachObject(entity);

nodeSecondary->setPosition(20.0f, 0.0f, -0.0f);
nodeSecondary->setOrientation(0.0f, -0.0f, -0.0f, -0.9144643269f);
nodeAstroChild->setPosition(20.0f, 0.0f, 0.0f);
nodeAstroChild->setOrientation(0.0f, 0.0f, 0.0f, 0.9144643269f);

cout << "###############################";
cout << this->node->getOrientation();
}

void PSphere::setNode(Ogre::SceneNode *node)
Expand Down
1 change: 0 additions & 1 deletion initOgre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ void initOgre::setSceneAndRun(PSphere *planet){
sphere1->attachObject(entity1);
planet->setNode(sphere1);


// # ################################### TEMP #############################################
float waterfraction = 0.6;
float radius = 7.5;
Expand Down

0 comments on commit 44b9a92

Please sign in to comment.