Hi, I’m a very new user. I’m beta testing a course on learning Unity 3d from Coursera.
The project of the first section is to build a solar system. Setting up primatives, putting a map on them, making them rotate and orbit, have sounds as they swoop past the camera…simple stuff… I’ve got that working just fine.
An additional script in the program (well two). A “Look at target” script on the camera and a “Change Look At Target” placed on the planets so you can switch which planet the main camera is looking at. I’ve got this working just fine.
Well, I wanted to get fancy. I do 3d art with Daz Studio, so I have lots of additional assets…so I imported an OBJ of the TARDIS and the Enterprise.
And I have both of them flying around the sun or planets, looking and behaving how I want.
EXCEPT, the “Change Look At Target” script doesn’t work on them. I put the script on them (they show up in the Hierarchy as a group of parented parts…I’ve tried the script on each of the parts…but not all at once…) but clicking on them doesn’t change the camera.

I’ve read the script, and don’t see anything that would say “This only works on sphere primatives”. Because it’s a beta test class, there’s no active teachers to answer the question, so I’ve come here ![]()
Here’s the script:
using UnityEngine;
using System.Collections;
public class ChangeLookAtTarget : MonoBehaviour {
public GameObject target; // the target that the camera should look at
void Start() {
if (target == null)
{
target = this.gameObject;
Debug.Log ("ChangeLookAtTarget target not specified. Defaulting to parent GameObject");
}
}
// Called when MouseDown on this gameObject
void OnMouseDown () {
// change the target of the LookAtTarget script to be this gameobject.
LookAtTarget.target = target;
Camera.main.fieldOfView = 60*target.transform.localScale.x;
}
}
Can anyone offer any thoughts on why what I’ve tried doesn’t work?