Is this solved? I cannot make triangle picking work.
-
Re: Qt3D point and line picking?
I am using Qt5.15.0. But this code cannot even compile because I cannot add a QSphereGeometry as component into entity. This line is reported error.
auto sphere = new Qt3DExtras::QSphereGeometry; entity->addComponent(sphere)
-
@huajian said in Is this solved? I cannot make triangle picking work.:
This line is reported error
Can you post the error?
-
../basicshapes-cpp/scenemodifier.cpp:159:26: error: cannot initialize a parameter of type 'Qt3DCore::QComponent *' with an lvalue of type 'Qt3DExtras::QSphereGeometry *' entity->addComponent(sphere); ^~~~~~
I know it should not work. But the author of the post that I cited reported his code worked! This is unexpected for me.
-
@huajian
I did see it used in the link you mentioned. I'm afraid you cannot rely on everything posted in this forum being literally correct! :) It may have worked then, or it may never have worked. I don't know your area, but I would read up about nodes, components & geometries until I knew how they fitted together --- which you will need to understand anyway --- and then hopefully I'd know the answer!