addFollower() публичный Метод

public addFollower ( GameObject obj ) : void
obj GameObject
Результат void
Пример #1
0
	private void createFollower(MoCapRigidBody rigidbody){
		// create object
		GameObject obj = (GameObject)Instantiate (rigidBodyObject);
		// make it follow the specified rigidbody (always adopt its position and rotation)
		rigidbody.addFollower (obj);
		// make the new object a child of our main object (this)
		obj.transform.SetParent (this.transform);
	}
Пример #2
0
    private void createFollower(MoCapRigidBody rigidbody)
    {
        // create object
        GameObject obj = (GameObject)Instantiate(rigidBodyObject);

        // make it follow the specified rigidbody (always adopt its position and rotation)
        rigidbody.addFollower(obj);
        // make the new object a child of our main object (this)
        obj.transform.SetParent(this.transform);
    }