Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT3d translation of an object
sunil.nair last edited by
Hi, I am new to QT. I am trying to move an object from one point to another in this function. But, rather than translating the object, QT creates a copy of the cube. How can I use translation.
I want the cube to remain at position1 and then move to position2 after 1 second.
const QVector3D position1(1,1,1);
const QVector3D position2(-1,0,-2);
builder1 << QGL::Faceted;
builder1 << QGLCube(2);
cube = builder1.finalizedSceneNode();
cube->setPosition(position1); Sleep(1000); cube->setPosition(position2);