CapsuleCollider.radius 半径


var radius : float

Description描述

The radius of the sphere, measured in the object's local space.

球体的半径,基于物体的自身坐标。

The capsule's radius will be scaled by the transform's scale.

如果变换的缩放改变,那么胶囊的半径也将被缩放。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {collider.radius = 1;}}
collider.radius = 1;


,