Abstract: The invention discloses a device and a method to control an object on a surface using motion sensor measurements and relative and absolute pointing algorithms. Relative pointing is preferred at low speeds and absolute pointing is preferred at high speeds. Transition between the results of the two algorithms has to be smoothed, using a weighted combination of the two results. The weights may be made dependent over time or over speed of the device. Maximum and minimum values of different parameters may have to be set to avoid jumps or changes in direction which may affect the user's experience negatively. The goal is that the user has consistent perceptions what he or she sees on the screen and the movements he or she imparts on the device, while still keeping the position of the object as close as possible to the position calculated by an absolute pointing algorithm.