Object translation

Started by david24, October 23, 2012, 01:55:11 PM

Previous topic - Next topic

david24

Hi guys,

wanted to ask how can i make 5(for example) scattered objects to translate all together by translating a 6th object alone, but so that if i'll translate one of the first 5 objects the other will stay at they're position??..

i know i can use the translate() method and work it out but i am searching for sort like using the setTranslationMatrix() method, but if i am using it, all the objects are collapsing to the same point. i need them to stay relatively apart from the 6th object.
Also all the objects are loaded with the Loader class and drawn on 0,0,0  and translated pragmatically .

thank you in advanced :))

EgonOlsen

Make the 5 objects children of the 6th one and give them translations relative to 6.

david24

thank you!!! 
it did the trick, need now only to adjust translations.

david24

Hmm...i got a thing here..
It works great, but it seems to me adding a parent is inverting my axis.

why do you think it happened?

david24

I have added a parent to a parent( i needed to ), and it inverted it again..so now it is as it were..