I'm displaying up to four 3d objects with the same marker at the same time.
I'm experiencing a couple of things that seem to be wrong, it's probably something I'm not doing correctly.
I need these objects to match in scale since they combine into one single object, however if I apply the same scale value to all of them they seem to have different ratio sizes. That's one of the issues.
On the other hand, since they combine and form a single object, I need them to rotate upon swipe maintaining the structure (they need to be stacked).
I've tried a lot of combinations without luck. First, every object I add seems to be centered in the target, even when my models match the position they need to be in in my 3dmax file.
Second, since this is happening, I tried translating them to the needed position, but when after doing so I rotate them, they all rotate in their center instead of doing so in the center of the projection. Not sure I'm being clear, let me know if I'm not!
I can post images or the part of the code where the objects are being transformed if needed.
Best
Juan
translation, scaling, rotation
Hi juanjuan
If they have different sizes, it could be that the modelview matrix is not being reset initialised correctly for each object, in which case some of the transformations might be cumulative.
translation, scaling, rotation
Thanks for your replay NalinS.
What would be the right way to reset the modelview matrix?
Before the code for rendering (scaling, translating, rotation and drawing) each object I have:
modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose());
translation, scaling, rotation
Hi juan
translation, scaling, rotation
Can you post the code that you're using to position and scale these models?
translation, scaling, rotation
Sure....and thanks for the help!
inside namespace
translation, scaling, rotation
I have the same problem. Have anybody the solution?
After applaying transformation(translation,scaling and rotation)
I want to animate all my elements rotate on theme selfs.
It not works all the elements move in not define direction.
translation, scaling, rotation
Hi Aimingo,
I wrote some time ago a couple of articles in our FAQ section, which explains how to handle transformations (rotation, scaling, translation) of a 3D object with our samples;
I suggest to have a look:
translation, scaling, rotation
Hi AlessandroB
Thank you for the answer.
I have already do the same recommandation on this example.
I will show you a part of my code:
translation, scaling, rotation
Hi, take into account the order of your transformations;
for example, I see in your code that you first apply some "animateMyModel" function to your modelview matrix, and then you apply translation after that;