Created
April 24, 2018 10:02
-
-
Save todorok1/46093113fb21be3f788534a8899445c7 to your computer and use it in GitHub Desktop.
Unityチュートリアル・角度に合わせて矢印を動かすスクリプト。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ChangeArrowAngle(){ | |
// 角度の矢印をボールの位置に移動 | |
arrowRt.position = RectTransformUtility.WorldToScreenPoint(Camera.main, transform.position); | |
// Z軸を中心に、forceAngleの値の回転を作って角度の矢印にセット | |
arrowRt.rotation = Quaternion.AngleAxis(forceAngle, Vector3.forward); | |
// GuideManagerのSetGuidePositions()を呼んでガイドを移動させる | |
if (!isFlying){ | |
guideManager.SetGuidePositions(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment