Huntress Prototype

The basic idea is to have a game in between grinding based RPG (Diablo, Monster Hunter) with epic combats like Horizon: New Dawn.

Each combat will take place in a arena-like zone, there is not a World to explore, it will be a midcore game.

The player will be able to control the character just with mouse clicks and the game will switch between 3 cameras:

  1. Chase camera, where the player will discover where the monster is and feel chased by it

  2. Combat camera where the player will feel the action of combat

  3. Strategic camera, where the player will be far enough from the moster and he can choose strategy.

the code of my camera manager is this (be aware of tags, if you want to reuse it)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraController : MonoBehaviour {
	private Transform playerTransform;
	private Transform monsterTransform;

	private Camera movementCamera;
	private Camera combatCamera;
	private Camera strategicalCamera;

	[SerializeField]
	private float distanceToSwitch = 20.0f;

	void Start() {
		playerTransform = GameObject.FindGameObjectWithTag("Player").transform;
		monsterTransform = GameObject.FindGameObjectWithTag("Monster").transform; //what if there are more monsters?

		movementCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
		combatCamera = GameObject.FindGameObjectWithTag("CombatCamera").GetComponent<Camera>();
		strategicalCamera = GameObject.FindGameObjectWithTag("StrategicalCamera").GetComponent<Camera>();
	}

	void LateUpdate () {
		transform.position = playerTransform.position;	

		if (Vector3.Distance(playerTransform.position, monsterTransform.position) < distanceToSwitch) {
			movementCamera.enabled = false;
			combatCamera.enabled = true;
			strategicalCamera.enabled = false;
		} else if (Vector3.Distance(playerTransform.position, monsterTransform.position) > 2*distanceToSwitch){
			movementCamera.enabled = false;
			combatCamera.enabled = false;
			strategicalCamera.enabled = true;
		} else {
			movementCamera.enabled = true;
			combatCamera.enabled = false;
			strategicalCamera.enabled = false;
		}
	}
}

Privacy & Terms