CactusJack
2002.12.11, 08:36 PM
Cocoa First Personal Viewpoints:
First, I'm not a hard-core game programmer: I am a beginner. I'm experienced in Windows programming, but I wanted to learn Cocoa, so I deceided I'd port some Open GL tutorials to Cocoa. This is why I would like Cocoa specific help. I've learned quite a bit about Cocoa, but I've hit some snags.
My question is this: I can track the position of the mouse in the glWindow through the mouseMoved event. What I'd like to do in each render cycle, take the coordinates of the mouse from this event and use the distance from them to the center of the screen to rotate my viewpoint and then set the mouse coordinates back to the center of the screen to start over again. Does anyone have any ideas on how to do this in Cocoa?
Also, how do it make it if I push Escape, the program quits? (because if I start moving the cursor back to the center all the time, I'll never be able to muse the Application menu to quit. appreciate
One last question. Do you know how to hide the cursor?
Thanks for any help you may be able to give me. I appreciate your time!
John Baker
First, I'm not a hard-core game programmer: I am a beginner. I'm experienced in Windows programming, but I wanted to learn Cocoa, so I deceided I'd port some Open GL tutorials to Cocoa. This is why I would like Cocoa specific help. I've learned quite a bit about Cocoa, but I've hit some snags.
My question is this: I can track the position of the mouse in the glWindow through the mouseMoved event. What I'd like to do in each render cycle, take the coordinates of the mouse from this event and use the distance from them to the center of the screen to rotate my viewpoint and then set the mouse coordinates back to the center of the screen to start over again. Does anyone have any ideas on how to do this in Cocoa?
Also, how do it make it if I push Escape, the program quits? (because if I start moving the cursor back to the center all the time, I'll never be able to muse the Application menu to quit. appreciate
One last question. Do you know how to hide the cursor?
Thanks for any help you may be able to give me. I appreciate your time!
John Baker