File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ AFRAME.registerComponent('look-at', {
6060
6161 // Look at a position.
6262 if ( typeof target === 'object' ) {
63- return this . lookAt ( new THREE . Vector3 ( target . x , target . y , target . z ) ) ;
63+ this . lookAt ( new THREE . Vector3 ( target . x , target . y , target . z ) ) ;
64+ return this . endTracking ( ) ;
6465 }
6566
6667 // Assume target is a string.
@@ -102,6 +103,10 @@ AFRAME.registerComponent('look-at', {
102103 this . target3D = targetEl . object3D ;
103104 } ,
104105
106+ endTracking : function ( ) {
107+ this . target3D = null ;
108+ } ,
109+
105110 cameraListener : function ( e ) {
106111 if ( e . detail && e . detail . name === 'camera' ) {
107112 this . update ( ) ;
Original file line number Diff line number Diff line change 2828 },
2929 "homepage" : " https://github.com/supermedium/superframe/tree/look-at#readme" ,
3030 "devDependencies" : {
31- "aframe" : " ^0.5 .0" ,
31+ "aframe" : " ^1.2 .0" ,
3232 "browserify" : " ^12.0.1" ,
3333 "budo" : " ^7.1.0" ,
3434 "shelljs" : " ^0.6.0" ,
You can’t perform that action at this time.
0 commit comments