By inspecting the original town with Unity Asset Bundle Extractor, we can find out that the script that is responsible for setting the camera position to the player is called ActPlayerSyncTarget
. Since Unity references scripts by name, we can simply create an empty script with the same name and the right one will be selected at runtime:
public class ActPlayerSyncTarget : MonoBehaviour
{
}
Open the t01_all
prefab and change the structure:
CinemachineVirtualCamera
ActPlayerSyncTarget
scriptThe Virtual Camera should be configured like this:
Drag SyncTarget into the Follow field and set Body to Transposer. Save the changes to your Prefab and rebuild the AssetBundle. The camera should now follow the player Pokémon.