Mastergod,
Appreciate the advice however I have spent the last 3 days or so searching the forums and still don't quite get it. I am always hesitate to post, as I truly don't want to waste anyone's time.
In re-reading my post though, I didn't mention the Custom Scene Node anywhere other than the title. Sorry about that. The problem definitely lies in my understanding of how it works. Below, I have added some additional information.
So, my experience thus far has been that this works great:
Code: Select all
ISceneNode * cube = myEngine->getSceneManager()->addCubeSceneNode(20.f);
cube->setMaterialTexture(0, myEngine->getDriver()->getTexture("./media/music/Folder.jpg"));
cube->setMaterialFlag(video::EMF_LIGHTING, false);
cube->setPosition(vector3df(50,50,50));
// To rotate similar to my example above
cube->setRotation(vector3df(0,45,0));
The custom scene node I've created has the following :
Code: Select all
vertices[0] = video::S3DVertex(position.X-10, position.Y-10, position.Z, 1,0,0, video::SColor(255,255,255,255), 0, 1);
vertices[1] = video::S3DVertex(position.X+10, position.Y-10, position.Z, 0,1,0, video::SColor(255,255,255,255), 1, 1);
vertices[2] = video::S3DVertex(position.X+10, position.Y+10, position.Z, -1,0,0, video::SColor(255,255,255,255), 1, 0);
vertices[3] = video::S3DVertex(position.X-10, position.Y+10, position.Z, 0,-1,0, video::SColor(255,255,255,255), 0, 0);
...
u16 indices[] = { 2,1,0, 2,0,3 };
Without rotation:
With vector3df(0,18.f,0) rotation:
Why does it move off the screen? The coordinates don't move - only the image (as it rotates)...
Thank you again.