www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: rjm49 on May 28, 2012, 01:35:19 pm

Title: Centering and rotating groups of objects
Post by: rjm49 on May 28, 2012, 01:35:19 pm
Hi, apologies if this has been discussed before, please point me to the relevant thread if so.

I have constructed a bunch of Object3Ds which sit together, and what I want to do is "group" them, then centre the group in my world (based on the geometry of the objects inside it) and rotate it around (0,0,0).

I'm aware that there is not a "group" concept as such, so I was wondering if it is good practice to use a dummy object for such a purpose?  Or whether it would be better to merge the objects (although they are tran'd/rot'd relative to each other which I guess a merge would undo).

I guess I can think of a couple of ways you might do it, and I just wanted to check for the best practice.  Any suggestions?
Title: Re: Centering and rotating groups of objects
Post by: EgonOlsen on May 28, 2012, 08:47:50 pm
I would use a dummy object and make the objects to be grouped a child of it.