File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libs/soba/abstractions/src/lib Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export class NgtsBillboard {
5757 if ( ! follow || ! group ) return ;
5858
5959 // save previous rotation in case we're locking an axis
60- const prevRotation = group . rotation . clone ( ) ;
60+ const prevRotation = inner . rotation . clone ( ) ;
6161
6262 // always face the camera
6363 group . updateMatrix ( ) ;
@@ -66,9 +66,9 @@ export class NgtsBillboard {
6666 camera . getWorldQuaternion ( inner . quaternion ) . premultiply ( q . invert ( ) ) ;
6767
6868 // 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 ;
7272 } ) ;
7373 }
7474}
You can’t perform that action at this time.
0 commit comments