Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 4, 2018 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/082a2326b5cc6c2b2c2a7dc033c9cf59 to your computer and use it in GitHub Desktop.
Save todorok1/082a2326b5cc6c2b2c2a7dc033c9cf59 to your computer and use it in GitHub Desktop.
Unityチュートリアル・コースアウト時の演出を実装するスクリプト
void LateUpdate(){
// カメラの拡大率に応じたオフセットを取得
Vector3 magnifiedOffset = GetMagnifiedOffset();
if (isTracing){
// 『Sphere』オブジェクトとオフセットからカメラの現在位置を計算
gameObject.transform.position = player.transform.position + magnifiedOffset;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment