using UnityEngine;
using System.Collections;
public class LTScript : MonoBehaviour {
public GameObject LTPrefab;
private float angle=45;
// Use this for initialization
void Start () {
for(int i=0;i<10;i++){
GameObject obj = (GameObject) GameObject.Instantiate(LTPrefab);
float hudu=(angle/180)*Mathf.PI;
float yy=i*Mathf.Tan(hudu);
obj.transform.position = new Vector3 (5*i,2*yy,0);
}
}
// Update is called once per frame
void Update () {
}
}
楼梯,梯度递增,计算代码-unity3D
最新推荐文章于 2022-04-10 11:02:36 发布