"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

Rotating the 3d model

Hi, I am trying to rotate 3d model by using following code but it is not working. ShaderUtils::rotatePoseMatrix(60, 1, 0, 0); I am writing it before ShaderUtils::translatePoseMatrix(0.0f, 0.0f, kObjectScale, &modelViewMatrix.data[0]); ShaderUtils::scalePoseMatrix(kObjectScale, kObjectScale, kObjectScale, &modelViewMatrix.data[0]); What is the issue? Thanks Ayaz Alavi

Hi ayazalavi, I don't know if this is just a C+P error in this post but you're missing the all important 5th parameter? To confirm, the angle is in degrees, as you have used. [CODE]ShaderUtils::rotatePoseMatrix(60, 1, 0, 0, &modelViewMatrix.data[0]);[/CODE]

ayazalavi

Mon, 03/26/2012 - 12:57

Please find attachment for the output of my code. How can I rotate this model so that left becomes right and right becomes left. ShaderUtils::rotatePoseMatrix(60, 0, 0, 1, &modelViewMatrix.data[0]); ??? Can you please provide correct values for x, y ,z and angle.

Sorry, from your snapshot and your request I don't understand what you are asking. For left to be right and vice-versa you need to reflect your model through a plane? Not rotate? But the picture seems to have left/right of the augmentation matching the target? Albeit the text is not aligned.

ayazalavi

Mon, 03/26/2012 - 13:33

I was completely able to rotate image by following code ShaderUtils::rotatePoseMatrix([B]180[/B], 0, 0, 1, &modelViewMatrix.data[0]); How can I show transition of this rotation? Because currently model simple rotate without any animation transition.

Hi,

I am able to rotate a 2d texture image by specifying

 

ShaderUtils::rotatePoseMatrix(rotateBowlAngle, 0.0f, 1.0f, 0.0f,