The following responder (defined in NSResponder) does not get called in an SKScene in OSX:
-(void) mouseMoved:(NSEvent *)theEvent {
DLog(@"TEST");
}
I have said the window to accept mouse moved events in the app delegate.
_window.acceptsMouseMovedEvents = YES;
Thank you in advance.
SOLUTION:
Add to the app delegate:
_window.acceptsMouseMovedEvents = YES;
[_window makeFirstResponder:self.skView.scene];
Add to the app delegate:
_window.acceptsMouseMovedEvents = YES;
[_window makeFirstResponder:self.skView.scene];
In swift
window.acceptsMouseMovedEvents = true;
window.makeFirstResponder(self.skView.scene)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With