mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-25 21:24:14 +02:00
Update engine.ts
This commit is contained in:
@@ -669,10 +669,25 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
grabbing.mesh.rotation = newRotation;
|
if (sticky) {
|
||||||
grabbing.mesh.position = newPos;
|
grabbing.mesh.position = newPos;
|
||||||
|
grabbing.mesh.rotation = newRotation;
|
||||||
|
}
|
||||||
|
|
||||||
console.log(sticky);
|
if (!sticky) {
|
||||||
|
this.gridPlane.isVisible = false;
|
||||||
|
//for (const mesh of grabbing.ghost.getChildMeshes()) {
|
||||||
|
if (mesh.material instanceof BABYLON.MultiMaterial) {
|
||||||
|
for (const subMat of mesh.material.subMaterials) {
|
||||||
|
if (subMat instanceof BABYLON.PBRMaterial) {
|
||||||
|
subMat.emissiveColor = new BABYLON.Color3(1, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mesh.material.emissiveColor = new BABYLON.Color3(1, 0, 0);
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
//const pos = new BABYLON.Vector3(this.camera.position.x, this.camera.position.y, this.camera.position.z);
|
//const pos = new BABYLON.Vector3(this.camera.position.x, this.camera.position.y, this.camera.position.z);
|
||||||
//const _dir = newPos.subtract(pos).normalize();
|
//const _dir = newPos.subtract(pos).normalize();
|
||||||
|
|||||||
Reference in New Issue
Block a user