playMaker

Author Topic: How to Translate Multiple Objects  (Read 1019 times)

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
    • View Profile
How to Translate Multiple Objects
« on: December 13, 2013, 11:51:12 PM »
Hello i make a spawner that loop 10 game objects in random positions then i want them to translate them all, but only the fsm only translate 1 game object, how can i translate them all?

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Re: How to Translate Multiple Objects
« Reply #1 on: December 14, 2013, 10:38:02 AM »
you could make a template attached to each Object translating them or a Loop with next child to itterate a hierarchy translating each child object a little in a loop.

cheers
Peter

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14564
  • Official Playmaker Support
    • View Profile
Re: How to Translate Multiple Objects
« Reply #2 on: December 14, 2013, 10:44:36 AM »
Hi,

 If these objects can be made as prefab, then it would be trivial.

I would actually not recommand using a loop to translate several objects, this will create performane issues if you start increasing the number of objects you want to translate. using a template or a prefab is much better I feel.

 also, you can perfectly parent these gameobjects to a dummy, translate that dummy and unparent when done ( not necessarly, they could always remain parented, that doesn't hurt), that's also very efficient.

bye,

 Jean