# Gizmos.createCircleGizmo
# 函数声明
public static createCircleGizmo(center: V3ReadOnly = Vector3.ZERO, radius: number = 1, radian: number = Math.PI * 2, startRadian: number = 0)
# 函数参数
参数名 | 说明 |
---|---|
center | 圆的初始位置,也就是重心在场景中的位置 |
radius | 圆的半径 |
radian | 圆的弧度,如果小于PI*2,将绘制一个圆弧 |
startRadian | 圆弧的初始角度,这决定了绘制圆的哪一段弧 |
# 示例
import engine from "engine";
export default class ExampleClass extends engine.Script{
// 创建一个中心点为(0, 0, 0),半径为1的圆形Gizmo
// 默认每个相机都将绘制该Gizmo
public circleGizmo;
public onAwake(){
var center = engine.Vector3.ZERO;
this.circleGizmo = engine.Gizmos.createCircleGizmo(center, 1);
}
}