Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sallen

Pages: [1]
1
Window / Relative mouse position on mac os x using SetCursorPosition
« on: October 30, 2009, 07:09:19 pm »
I see... In any case there has to be a way of doing an FPS camera on SFML and OSX. Hasn't anyone done it before?

EDIT:
I succeeded using a different approach. I used CGGetLastMouseDelta (from the ApplicationServices framework) to get the mouse delta. This function ignores the screen borders, so you can move the mouse indefinitely. As long as I don't want to click (you would click outside the window) I'm good with this solution.

2
Window / Relative mouse position on mac os x using SetCursorPosition
« on: October 30, 2009, 04:56:36 pm »
Hello there. I the same problem with OSX and SetMousePosition. I'm trying to achieve a FPS-like mouselook camera.

When the mouse cursor reaches the end of the screen it obviously stops, so I can't use the mouse position to calculate the camera rotation right away. I have tried to "reset" the mouse position so it stays at the center of the window, but every time I call SetMousePosition, the mouse movement stops (I have to stop moving it and start again in order for the application to notice I'm still moving the mouse).

Is there any built in way to get the mouse speed in SFML or another way of reseting the mouse cursor seamlessly? Any other techniques for FPS cameras?

Thank you!

This is my first post, so hello everyone :P

Pages: [1]
anything