Disabling Mouse Control

Is it possible to disable mouse view control without disabling the cursor? Mouse should work normally, but it shouldn’t control the camera. Is there a simple way to do this?

You can configure the different control methods with config.controlMode = FREE or FIXED. However those are the only two for now :slight_smile:

Is that what you meant?

Not exactly. Basically I’m testing an Overlay Inventory. It works nice, but when it’s open, mouse continues to move the camera and I don’t want that. As long as overlay is active I want it to stop moving camera.

I can change control mode, but in all control modes mouse controls the camera one way or another. I want camera to stand still like a slide, but mouse should still be free.

I hope I’m making myself clear enough.

Did you try doing this?

register(MOUSE_RIGHT_BUTTON, function() if config.controlMode == FREE and Overlayer.isClosed() then config.controlMode = FIXED elseif config.controlMode == FIXED then config.controlMode = FREE end end)

It will catch the right click and avoid switching the control method.

That’s my problem. FIXED, FREE, or DRAG, they all mess up the inventory controls and camera still moves. I need all modes deactivated. Just like free mouse cursor in FIXED mode but without right mouse toggle, because I’m using right click for inventory :frowning: As far as I know it’s only possible to use mouse keys with register command. I can’t assign functions to other keys any other way. At least I don’t know how.

I think I’m not able to explain my problem very well. Maybe I’ll just try to find a way around it for now. So thanks for the help all the same Agustin.

Oh, right! Right! Now I understand. Yes, we don’t support that yet, I’m afraid, but we will :slight_smile:

Ha, I thought so. It’s good to know. I can continue without it, since it’s not that urgent. :slight_smile:

Interestingly when I use config.controlMode = 0, it does exactly what I want. Camera movement disabled until you set another mode.

Also it seems like commands like “if config.controlMode == FIXED” not working in scripts but “if config.controlMode == 1” does. It took me a while to figure that out. :paranoid:

Ah, about the FIXED, FREE, etc labels, they won’t work in the config.lua. Never figured out why. But they should work on scripts, provided they haven’t been rewritten…