I am a newbie on a learning curve....
I have dropped a mesh, 3rd person controller, and smoothfollow into a prefab.
I instantiate the prefab gameobject and attempt to assign the target for smoothfollow.
PlayerShip = Instantiate (PlayerShip, Vector3 (0,0,0), Quaternion.identity);
Debug.Log("goin for it!");
var sf : SmoothFollow = Camera.main.GetComponent(SmoothFollow);
if (sf)
{
sf.target = PlayerShip.transform;
Debug.Log("got it!");
}
I see "goin for it!" but I don't see "got it!" in the console window.
When I run it it my playership mesh moves to the press of the arrow keys but the camera is not attached to the playership.
Am I doing this correctly?
never assume anything with a newbie. I had the smoothfollow on the plane. doh! Thanks!
– anon11751313