SphereCollider.radius 半径
var radius : float
Description描述
The radius of the sphere, measured in the object's local space.
球体的半径,基于物体的自身坐标空间。
The sphere 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 = 10;}}
collider.radius = 10;