球形范围判定

物理
Both Server and Client
Both Mobile and PC

判断目标实体是否在规定的球体范围内,如果实体没有位置属性,会返回假

声明

func IsInsideSphere(target entity, center Vector3, radius float) bool
go

参数

输入

名称 类型 描述
目标 entity 目标实体
中心点 Vector3 规定球体的球心
半径 Float 规定球体的半径

返回

类型 描述
Bool 判定结果