x


Changing a childs Orientation with iTween

Hello

Is it possible to make an iTween Command affect a child in an object, as in, you have the script on the parent and tell the child through that script that it should move to a location.

kinda like this, it is taken from the unity documentation:

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    void Awake() {
        transform.Find("Hand").Translate(0, 1, 0);
    }
}

I have been through the iTween documentation, and i havnt been able to find anything of use.

Thanks in advance

Seth

more ▼

asked Feb 18 '11 at 10:10 AM

Kacer gravatar image

Kacer
705 14 17 31

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Sure, just make a reference to whatever you want to animate:

hand = GameObject.Find("Hand"); iTween.MoveBy(hand, new Vector3(2,0,0), 1);

more ▼

answered Feb 18 '11 at 06:49 PM

pixelplacement gravatar image

pixelplacement
682 8

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5089
x426
x426
x413

asked: Feb 18 '11 at 10:10 AM

Seen: 939 times

Last Updated: Feb 18 '11 at 10:10 AM