Author Topic: how to get the position of an object3d  (Read 3624 times)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
how to get the position of an object3d
« on: March 12, 2006, 10:16:04 am »
Hi, I am doing my game, and to be able to easy load new maps, I defined som objects on the map with specific names, when reading the parts of the 3ds, if the partname is the one I used to locate a certain pint, it must take the position of that object3D and save it on another place, but I cant get the position of that Object, I always get 0, 0, 0 using getTranslation, getCenter, etc etc etc etc. Always the same.

What can I do?
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
how to get the position of an object3d
« Reply #1 on: March 12, 2006, 11:24:44 am »
Try Object3D.getTransformedCenter().

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
how to get the position of an object3d
« Reply #2 on: March 12, 2006, 11:28:52 am »
I did that and I got 0, 0, 0.

I mean getting the position on the loop where all the parts of the 3ds are merged.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
how to get the position of an object3d
« Reply #3 on: March 12, 2006, 11:43:55 am »
Call build() and then getCenter(). Without build being called, the object doesn't have a center calculated.