Skip to content

how apply a translate to an array of object?

Ask for help here ;)

how apply a translate to an array of object?

Postby kyy921 » 23 Sep 2012, 21:19

I wanna use universe to access some funcition like the code below

I wanna find the gameobjects with certain tag, and apple translate to all the object find...

how to do it in universe?
Attachments
TM截图未命名2.png
TM截图未命名.png
TM截图未命名.png (32.77 KiB) Viewed 703 times
kyy921
 
Posts: 56
Joined: 15 Jul 2012, 08:29

Re: how apply a translate to an array of object?

Postby Stardog » 23 Sep 2012, 21:36

You can do a foreach loop like this:
Image

A for loop like this:
Image

Foreach is bugged right now, so just use the for loop version.

But before the Transform block, you have to get the Gameobject's Transform component. There are many ways to do this: Super Universal Wizard block, transform block, etc.

Get Length
Iterator For (0, Get Length's output)
Get at Index (array output, for loop current iteration output)
Wizard (takes Get at Index's current GameObject, output the current GO's transform)
Transform (takes the Wizard's transform output)
Stardog
 
Posts: 4
Joined: 19 Feb 2012, 00:25

Re: how apply a translate to an array of object?

Postby holyjewsus » 23 Sep 2012, 21:59

you can also use the generic array iterator instead of for
holyjewsus
 
Posts: 390
Joined: 08 Apr 2011, 00:58

Re: how apply a translate to an array of object?

Postby kyy921 » 23 Sep 2012, 22:19

thank you! it can be done
kyy921
 
Posts: 56
Joined: 15 Jul 2012, 08:29

Re: how apply a translate to an array of object?

Postby beddnollop » 15 May 2015, 19:49

I really liked this information.
beddnollop
 
Posts: 13
Joined: 15 May 2015, 09:33


Return to HELP!!!

Who is online

Registered users: No registered users