Page 1 of 1

Mousepointer instead crosshair

Posted: February 26th, 2012, 4:33 am
by Yeto1964
Hello,

is it possible to have the Mouse working "as a mouse" in rpg-mode while
walking alround. If I do this, there is just the crosshair in the middle of the screen.
The mouse is only shown, when you open a menue.
This is not the way an RPG works!

Maybe someone can help me with that; I searched the forum, but found nothing depending this issue.

Re: Mousepointer instead crosshair

Posted: March 1st, 2012, 6:53 am
by Hirato
Firstly, RPGs do not require a birds-eye view.

To have this sort of "mouse select", you'd need to free the crosshair, which for starters means you'd need to remove the hook in the GUi system that resets it to x,y: 0.5 0.5 every frame, and you'd throw this into the inv perspective matrix to get the position vector of the cursor on the world.

You would then use this this result to trace from the camera to the cursor position and select a hover target for any clicking interactions.
I'll leave making the UI/HUD up to you, as well as how the various keys will behave here.
Also if you want to override the camera, that'd be easiest to hijack recomputecamera in the game code to do a detached thirdperson/birds eye perspective.