made connections not grabbable.

This commit is contained in:
Michael Mainguy 2024-05-30 10:11:07 -05:00
parent f26aa01211
commit d0b08b72e2
2 changed files with 8 additions and 2 deletions

View File

@ -139,8 +139,10 @@ export class Base {
switch (this.grabbedMeshType) {
case MeshTypeEnum.ENTITY:
const diagramObject = this.diagramManager.getDiagramObject(mesh.id);
diagramObject.baseTransform.setParent(this.xrInputSource.motionController.rootMesh);
this.grabbedObject = diagramObject;
if (diagramObject.isGrabbable) {
diagramObject.baseTransform.setParent(this.xrInputSource.motionController.rootMesh);
this.grabbedObject = diagramObject;
}
break;
case MeshTypeEnum.HANDLE:
this.grabbedMesh.setParent(this.xrInputSource.motionController.rootMesh);

View File

@ -71,6 +71,10 @@ export class DiagramObject {
return this._baseTransform;
}
public get isGrabbable() {
return this._diagramEntity?.template !== '#connection-template';
}
public get diagramEntity(): DiagramEntity {
if (this._mesh) {
this._diagramEntity = toDiagramEntity(this._mesh);