Can't set proper camera settings for Ellen character (Game Kit) as prefab,Can not assign LookAt and Follow to Ellen as prefab
Hi guys,
I'm currently training my skills on Ellen Game Kit.
I'm using Photon/Pun and to do so I need to set Ellen as prefab (put it in Resources folder) and remove the character from the Hierarchy. Once done, the camera settings are missing and I need to replace them. As result, when you load scene you can see the sky only (lol)
The 2 missing settings are follow and lookAt.
As the tooltip explains: Follow need to be set to Ellen and lookAt to HeadTarget (child object of Ellen)
When I drag and drop Ellen prefab to Follow and LookAt. The camera stay in the middle of the map and I can rotate 360° but not move so lookAt works partially but camera doesn't Follow the character (so follow not works).
Anyway for lookAt the child object HeadTarget should be drag and dropped rather than the whole Ellen character but can't do this with prefab obj.
I have tried to do something like this (in Ellen obj and also tried in CameraRig obj) but it doesn't works:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class lookAt : MonoBehaviour
{
public Transform target;
// Start is called before the first frame update
void Start()
{
target = GameObject.FindGameObjectWithTag("Player").transform;
}
void Update()
{
if(target != null)
{
transform.LookAt(target);
}
}
}
You guys have any ideas?