www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Melssj5 on March 12, 2006, 10:16:04 am

Title: how to get the position of an object3d
Post by: Melssj5 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?
Title: how to get the position of an object3d
Post by: EgonOlsen on March 12, 2006, 11:24:44 am
Try Object3D.getTransformedCenter().
Title: how to get the position of an object3d
Post by: Melssj5 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.
Title: how to get the position of an object3d
Post by: EgonOlsen 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.