#NEWLINE# def drag( self , task ) : #NEWLINE# #INDENT# if ( not base . mouseWatcherNode . hasMouse ( ) ) : #NEWLINE# #INDENT# return Task . cont #NEWLINE# #UNINDENT# curMouseCoord = ( base . mouseWatcherNode . getMouseX ( ) , base . mouseWatcherNode . getMouseY ( ) ) #NEWLINE# delta = ( ( curMouseCoord [ 0 ] - self . initialMouseCoord [ 0 ] ) , ( curMouseCoord [ 1 ] - self . initialMouseCoord [ 1 ] ) ) #NEWLINE# xQuat = Quat ( ) #NEWLINE# xQuat . setFromAxisAngle ( ( delta [ 0 ] * self . SCALE ) , Vec3 ( 0 , 0 , 1 ) ) #NEWLINE# yQuat = Quat ( ) #NEWLINE# yQuat . setFromAxisAngle ( ( ( delta [ 1 ] * self . SCALE ) * ( - 1 ) ) , Vec3 ( 1 , 0 , 0 ) ) #NEWLINE# self . node . setQuat ( base . cam , ( ( self . initialQuat * xQuat ) * yQuat ) ) #NEWLINE# return Task . cont