Vector3(0, 1, 0)的简码,也就是向y轴。" />Vector3.up 向上_unity3d脚本手册|游戏脚本制作教程-游戏蛮牛

Vector3.up 向上

static var up : Vector3

Description描述

Shorthand for writing Vector3(0, 1, 0)

Vector3(0, 1, 0)的简码,也就是向y轴。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		transform.position += Vector3.up * Time.deltaTime;
	}
}
transform.position += Vector3.up * Time.deltaTime;
Page last updated: 2010-12-19