Author Topic: Model is not on the right position when integrating jPCT-AE with Vuforia 6.2  (Read 1643 times)

Offline imiyar

  • byte
  • *
  • Posts: 6
    • View Profile
Hi friends,

I am trying to integrate jPCT-AE with Vuforia 6.2 sample code and it is not working well.

The problem I have is that I cannot see the model unless I translate it along the Z axis by a negative number. It seems that the model is rendered "beyond the scene". But if I add a line like cylinder.translate(0,0,-100), the model will appear but it doesn't stay on the same position on the marker when I move the phone.

The code I use is from the Vuforia559_jPCT-AE repo on Github. I replace the ImageTarget part in Vuforia 6.2 sample with the code in src/com/vuforia/samples in Vuforia559_jPCT-AE. No other changes beside this.

I have no clue about how to deal with this problem... Anyone has some ideas? Thanks!!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Have you checked that the model is actually centered in object space? What does getCenter() on it returns after calling build()?

Offline imiyar

  • byte
  • *
  • Posts: 6
    • View Profile
Thank you for the quick reply! Actually I figured it out myself.

There's nothing wrong with the code. The reason is that the size of the default marker in Vuforia 6.2 sample is set to [0.24, 0.17] in their .xml file (they use meter as default unit scale), and the size of the cylinder in the scene is [20, 40]... That's why things got weird.