Unsolved qt3dstudio mouse action inside plane or cube
-
Hello, I try to insert map in plane via Qt Quick and studio 1.0 as texture and the map is displayed in the plane as I need but the mouse doesn't do any action in it (zoom or move the map).
I try to add mouse area in different place like in Item{}, in Studio3D{}, in Presentation{} but nothing change.
Do you know what I have to do?
Thank you very much :-)
-
@filipdns Could you show me the shotcut of picture? Thanks a lot!
-
@small_bird hello, picture of what? ;-)
-
@filipdns of the phenomenon you described.
-
@filipdns China is at night,I will answer you tomorrow.
-
you will not see by picture, the problem is:
if you put simple map on qml page, you can zoom or move the map with the mouse, but if the map is on face of cube, I can not having action on it from mouse
-
I think it reduces to a textures and no longer support direct mouse actions.
But I have no tested it so not 100% sure :) -
@filipdns actually,you can do that using qt 3Dstudio
-
how do you that?
-
@filipdns The object you export from blender could be spinned by mouse from outline in qt3dstudio.
-
@small_bird I'm very sorry, I don't know what you mean...
Do you have an example?
Thank you very much
-
@filipdns
Can you see the picture? The cylinder can be spun by mouse. Just export it to .uip file and then load using qml. You will get the effect. The cube is the same! -
@filipdns Good night from China!
-
Hello, like that yes I can do, this is only animation recorded by studio, that not the question.
For navigation MAP I need to get action mouse in real time
-
import QtQuick 2.8 import QtQuick.Window 2.2 import QtStudio3D 1.0 import QtQuick.Controls 2.1 import Qt3D.Render 2.0 ApplicationWindow { visible: true width: 1280 height: 768 title: qsTr("Hello World") property real rotationValue: 0; Studio3D { id: studio3D anchors.fill: parent; MouseArea{ anchors.fill: parent; onWheel: { var temp=wheel.angleDelta.y/120; if(temp<0){ temp=-temp; for(var i=0;i<temp;++i){ animationElement.setAttribute("rotation.z",rotationValue-=0.1); } } else{ for(i=0;i<temp;++i){ animationElement.setAttribute("rotation.z",rotationValue+=0.1); } } } } Presentation { id:presentation; source: "qrc:/../../Desktop/rotateCylinder.uip" SceneElement { id: scene; elementPath: "Scene" } Element { id: textureElement; elementPath: "Scene.Layer.holeCylinder.Cylinder.M"; } Element { id: animationElement; elementPath: "Scene.Layer.holeCylinder.Cylinder"; } } ViewerSettings { scaleMode: ViewerSettings.ScaleModeFill; showRenderStats: true; } onRunningChanged: { console.log("Presentation ready!"); } } }
See the code above, the texture can be rotated by mouse.