鼠标滑到模型上获取模型信息
1.给Mesh 添加 ActionManager(不添加此项获取不到值)
mesh.actionManager = new ActionManager(this.scene);
2.添加鼠标划入事件
scene.onPointerObservable.add(function(e){
console.log(e.pickInfo.pickedMesh.name)
}, PointerEventTypes.POINTERMOVE)
鼠标滑到模型上获取模型信息
1.给Mesh 添加 ActionManager(不添加此项获取不到值)
mesh.actionManager = new ActionManager(this.scene);
2.添加鼠标划入事件
scene.onPointerObservable.add(function(e){
console.log(e.pickInfo.pickedMesh.name)
}, PointerEventTypes.POINTERMOVE)