我是靠谱客的博主 坚强发卡,这篇文章主要介绍Laya ,Math,四元数Quaternion 旋转,三角向量,两个位置求角度,现在分享给大家,希望可以做个参考。

//************************************** Laya Quaternion *************************************//
export class AI extends PlayerBase {
constructor() {
super();
}
private _index: number;
public init() {
super.init();
this.shootInterval = 100;
this.playAnimation(AnimationType[AnimationType.gw_idle]);
this._bodyColor = GameConfigXX.DEFAULTCOLOR;
this._briefs = GameConfigXX.DEFAULBRIEFS;
this._pistolName = GameConfigXX.DEFAULPISTOL;
this.setPistol(this._pistolName);
this._isCanShoot = true;
// this.addEventListener();
// this.lookAtPlayer();
}
public lookAtPlayer(index: number) {
var target = null;
if (index == 0) {
target = ModelCtr.instance.map.getStartMoveTran().position.clone(); //根据场景中的 不同位置的节点通过getChildByName获取
} else if (index == 1) {
target = ModelCt

最后

以上就是坚强发卡最近收集整理的关于Laya ,Math,四元数Quaternion 旋转,三角向量,两个位置求角度的全部内容,更多相关Laya内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部