Mouse acceleration curve

Apprentice
Posts: 9
Joined: 2007.04
Post: #1
I'm making a game using Unity (I know, I know), and I'm implementing my own cursor because Unity doesn't let you move the system mouse cursor. Using the raw axis data, I've made a cursor that works, but it feels wrong because it doesn't have any acceleration applied to it. I'm not sure what the curve is supposed to look like, but I'd like to reproduce it. I've searched a bit and mostly only found complaints about the default acceleration curve in this or that operating system. Nobody provides an actual function.

Does anyone here know where I can find the actual calculations behind OS X' mouse acceleration?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
The function is called NXGetMouseScaling, this ancient OMNI Group PDF shows how to use it. You'll have to write yourself a little bit of C, and call that from your Unity program (I understand this is possible, but know nothing about the details).
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2007.04
Post: #3
Thanks for the link. Unfortunately, I only have an Indy licence, and Unity's support for system calls is limited to the Pro version. What I might try and do is use that code to get a bunch of points from that curve and just lerp them.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Smooth acceleration in every direction. Honey Sharma 1 4,339 Aug 16, 2011 01:37 AM
Last Post: PoseMotion
  Device motion detection using Acceleration data. RockyDilse 4 8,389 Feb 16, 2011 12:57 AM
Last Post: RockyDilse
  Need help with acceleration/time physics... leRiCl 19 10,221 Jan 22, 2007 07:46 PM
Last Post: Ummon