[]position -position应该怎么写??
我这样写报错, viewDir显示是 NaN
var viewDir;
Laya.timer.frameLoop(1, this, viewDirLoop);
function viewDirLoop() {
cameraPos = camera.position;
viewDir = camera.position - lineMesh.transform.position;
console.log(viewDir);
lineMesh.transform.lookAt(new Laya.Vector3(3, 3, 3), viewDir, true);
}
var viewDir;
Laya.timer.frameLoop(1, this, viewDirLoop);
function viewDirLoop() {
cameraPos = camera.position;
viewDir = camera.position - lineMesh.transform.position;
console.log(viewDir);
lineMesh.transform.lookAt(new Laya.Vector3(3, 3, 3), viewDir, true);
}
没有找到相关结果
已邀请:
要回复问题请先登录
3 个回复
183*****755
赞同来自:
demibug
赞同来自:
183*****755
赞同来自: