纳金网

标题: 三维螺旋运动的代码 [打印本页]

作者: 烟雨    时间: 2015-5-29 02:52
标题: 三维螺旋运动的代码
三维螺旋运动的代码
  1. using UnityEngine;
  2. using System.Collections;

  3. public class test_3d : MonoBehaviour {
  4.         void Start () {       
  5.         }               
  6.         void Update () {
  7.         Up_force();
  8.         }
  9.     void Up_force()
  10.     {
  11.         transform.Translate(0f, 0f, 1f);
  12.         transform.RotateAround(Vector3.zero, Vector3.forward, 200f * Time.deltaTime);
  13.          
  14.         
  15.     }
  16. }
复制代码





欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5