Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 rut = new Vector3(0, 0, 20);
- Vector3 targetPos = Vector3.zero;
- Vector3 pos = targetPos;
- pos.x += (float)(25f * Mathf.Cos(angles.x) * Mathf.Sin(angles.y));
- pos.y -= (float)(25f * Mathf.Sin(angles.x));
- pos.z += (float)(25f * Mathf.Cos(angles.x) * Mathf.Cos(angles.y));
- _sun.transform.position = new Vector3(pos.x, pos.y, pos.z);
Add Comment
Please, Sign In to add comment