File tree 1 file changed +4
-4
lines changed
libs/soba/abstractions/src/lib
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export class NgtsBillboard {
57
57
if ( ! follow || ! group ) return ;
58
58
59
59
// save previous rotation in case we're locking an axis
60
- const prevRotation = group . rotation . clone ( ) ;
60
+ const prevRotation = inner . rotation . clone ( ) ;
61
61
62
62
// always face the camera
63
63
group . updateMatrix ( ) ;
@@ -66,9 +66,9 @@ export class NgtsBillboard {
66
66
camera . getWorldQuaternion ( inner . quaternion ) . premultiply ( q . invert ( ) ) ;
67
67
68
68
// readjust any axis that is locked
69
- if ( lockX ) group . rotation . x = prevRotation . x ;
70
- if ( lockY ) group . rotation . y = prevRotation . y ;
71
- if ( lockZ ) group . rotation . z = prevRotation . z ;
69
+ if ( lockX ) inner . rotation . x = prevRotation . x ;
70
+ if ( lockY ) inner . rotation . y = prevRotation . y ;
71
+ if ( lockZ ) inner . rotation . z = prevRotation . z ;
72
72
} ) ;
73
73
}
74
74
}
You can’t perform that action at this time.
0 commit comments