[]为什么动态设置聚光灯朝向无效呢
var tar = new Laya.Vector3();
var dir = new Laya.Vector3();
var src = model.transform.position;
spotLight.transform.position = camera.transform.position;
Laya.Vector3.subtract(src, camera.transform.position,tar);
Laya.Vector3.normalize(tar, dir);
spotLight.direction = dir;
目的是让聚光灯,始终朝向模型, 模型是在移动的, 但是没有光的效果?
var dir = new Laya.Vector3();
var src = model.transform.position;
spotLight.transform.position = camera.transform.position;
Laya.Vector3.subtract(src, camera.transform.position,tar);
Laya.Vector3.normalize(tar, dir);
spotLight.direction = dir;
目的是让聚光灯,始终朝向模型, 模型是在移动的, 但是没有光的效果?
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
ymsdandan
赞同来自: