niu-gdo / IGDO-Fall-2023-Project

IGDO's Fall 2023 game project.
7 stars 0 forks source link

Simple Camera Dolly #39

Open ExplosiveEggshells opened 10 months ago

ExplosiveEggshells commented 10 months ago

Overview

Some of our game's rooms will not be able to be fully encapsulated within one screen space. Therefore, we'll have need for a moving camera behavior that will pan to keep the character and a subsection of the room in frame.

Detail

This will involve creating a new script, CameraDolly.cs, which will move the GameObject it is attached to to the position of a target transform (The player position, in most circumstances).

For now, we will acquire the player GameObject by searching for it via a tag- using GameObject.FindGameObjectByTag("player").

Then, in the LateUpdate method, set the attached game object's transform position equal to the target's position.

Remarks:

Tasks