Switching input handlers?

Hey, I've been stuck with this problem for a while now. I want to make a UI whereby the mouse appears on the screen as an actual pointer, then if I hold the left mouse button, the pointer disappears and moving the mouse causes the rootnode to rotate. As I move the mouse left, the rootnode will rotate left. When I stop moving it, the rootnode will stop rotating. When I let go of the mouse button, the mouse pointer will appear where it was when I pressed it. Initially, I thought I could do his using the RelativeMouse and AbsoluteMouse mousehandlers and just have it switch between them on mousedown and mouseup. This did not work at all :/.



I just tried RenControlEditor to see if I could get an idea for the code, only to find that when it says "mouselook", it means something entirely different and practically useless – camera acceleration based on the position of the mouse on the screen. This is of no use to anybody, as far as I am concerned. Any program that used as confusing a control method as this will be very difficult to use indeed.



Has anyone got any ideas on how to make this work?

You should be able to use Relative and AbsoluteMouse alternatingly. Just be sure to set 'using delta' to true on the absolute mouse.

EDIT: fixed :/.

The jME javadocs are severely lacking.

Nyphur, add to the JavaDocs and contribute back then. :wink:



The first step in correcting a problem is figuring out there is a problem.  Based on this, it would seem as though you are a perfect candidate to write some JavaDocs. :slight_smile:



darkfrog