I'm working on a game using core animation that depends on hitting CA layers. This works great as long as the user is not in fullscreen mode; when in fullscreen, hits are still registered, but they do not correspond to the objects. Any ideas what might be going wrong? Here is my code for detecting the hit:
-(GameObjectLayer *)chipLayerHit:(NSPoint)mouseloc { NSPoint translated = [[gameController window] convertScreenToBase:mouseloc]; CGPoint point = NSPointToCGPoint(translated); CALayer *rootLayer = [[[gameController window] contentView] layer]; id hitLayer = [rootLayer hitTest:point]; if (![hitLayer isKindOfClass:[GameObjectLayer class]]) return nil; else return hitLayer; } GameObjectLayer is, ultimately, a CALayer. I'm looking for just hits on GameObjectLayer objects, not on other sorts of objects that are floating around. I'm wondering whether I need to modify the first line of the method (NSPoint translated = [[gameController window] convertScreenToBase:mouseloc];) when in fullscreen mode? Thanks, Ravi Coyne _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com