"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

translation, scaling, rotation

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

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.

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());

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.

AlessandroB

Mon, 07/01/2013 - 08:02

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:

AlessandroB

Mon, 07/01/2013 - 08:43

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;