camera is now orienting to target on click on contents

This commit is contained in:
2020-09-17 15:57:25 +02:00
parent 6b1d2f70e5
commit 5bbc4991c5
3 changed files with 39 additions and 25 deletions
+5 -2
View File
@@ -225,8 +225,11 @@ export default {
// this.face = 'left'
// this.position.x = this.projPos.x - this.projSize.x / 2 + 0.1
// this.rotation.y = 90
// First shift grid place (will transfer it from free places to occupied places)
this.shiftGrid({ type: this.type, id: this.id })
if (typeof this.gridContentPlaced[this.type] === 'undefined' ||
typeof this.gridContentPlaced[this.type][this.id] === 'undefined') {
// First shift grid place (will transfer it from free places to occupied places)
this.shiftGrid({ type: this.type, id: this.id })
}
// Then get the right place for the current content
let pos = this.gridContentPlaced[this.type][this.id]
console.log('pos', pos)