创建弹道运动

可播放
Both Server and Client
Both Mobile and PC

创建弹道运动,会给予目标实体带有方向的初速度与加速度

声明

func CreateTrajectory(target entity<Entity>, initialVelocity Vector3, acceleration Vector3, maxDisplacement float, out var createdEntity entity<Trajectory>, autoPlay bool)
go

参数

输入

名称 类型 描述
目标 Entity 目标实体
初速度 Vector3 运动初速度
加速度 Vector3 运动加速度
最大位移 Float 最大位移距离
立即播放 Bool 创建后是否自动开始播放

输出

名称 类型 描述
创建的实体 PlayableTrajectory 创建的弹道运动实体