Author Topic: Problem with object position  (Read 2704 times)

Offline thejauffre

  • byte
  • *
  • Posts: 14
    • View Profile
Problem with object position
« on: January 23, 2018, 11:50:07 am »
Hi,
I have a problem when loading some OBJ files. I'm using JPCT-AE and Vuforia. In the same world, I have to render 2-3 objects, that I export from the same scene in 3ds max.
The problem is in the positioning: even if an object has position (0,0,0) in 3ds, when I load multiple objects in JPCT the position is not correct. The objects are somehow translated. But when I load a single object, it is in the correct position.
Am I missing something?
Thanks in advance for your help.
« Last Edit: January 23, 2018, 12:28:05 pm by thejauffre »

Offline thejauffre

  • byte
  • *
  • Posts: 14
    • View Profile
Re: Problem with object position
« Reply #1 on: January 23, 2018, 01:32:43 pm »
Ok, the problem was a rotation... In fact, rotating each object, the result appeared translated.
I solved using a Parent object, and applying the rotation only to it.

Offline Mareos9593

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Problem with object position
« Reply #2 on: May 14, 2019, 04:32:53 pm »
I have the same problem, can you post the code please  :(

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Problem with object position
« Reply #3 on: May 16, 2019, 12:03:49 pm »
Object3D has a static method to create a dummy object. Use one of those, attach it as a parent to all the other objects in question, then rotate the dummy.