Jump to content

showCursor bugged ?


DEFCON1

Recommended Posts

Hi all, I wanted to ask on IRC but it seem to be down at the moment, as well as gtaforums.com.

I would like to disable mouse movements in game when I press a key on my keyboard (let's say "w")

I don't know how to explain... imagine that I want to make like when a GUI is shown on player screen: the cursor show, and then he can move the mouse without affecting the camera in the game.

I want to do the same thing, but without any GUI or cursor showing. So I tried to use showCursor:

showCursor( false, true ) -> I can still use the mouse to move the camera. Like if this function wasn't called.

showCursos( true, true ) -> camera is locked, but mouse cursor is visible.

Any idea ?

Also,I would like to still be able to get the position of the cursor, even if it's invisible.Possible?

Link to comment

In a clientside script, but as I said, showCursor(true, true) is not what I want!

I want to hide the cursor but lock the camera so when the player move his mouse, it does nothing to his screen but my script handle the mouse movements to calculate something.

I tried to lock the camera using get/setCameraMatrix, but then I have a problem to unlock it, I can't find a better way than doing setCameraTarget, which look crappy as I don't want the camera to move to the back of the player...

Link to comment

Not really. As I also want to retrieve the mouse cursor position, even if that cursor isn't visible... But I think that's impossible, for now anyway.

I just wanted to do a radial menu today, likein left 4 dead. It's actually very cool, only..well, you have to move the cursor to select the item.. I may release it soon since I can't finish it as I want.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...