Camera keeps rotating after opening a menu with NativeUI

Hey,

I’m developing a menu with NativeUI and when I start the menu my camera is getting rotating until I move my mouse. When I click in the menu or go into a submenu it’s also all fine, but when I go from the submenu back into the main-menu it starts rotating again.

code:

Can someone help me there?

1 Like

As I think, you can’t really fix that in this resource, you will probably need to edit NativeUI itself then. BUT if you do not need the mouse anyway you can deactivate it.

1 Like

No I don’t need the mouse. How can I deactivate it?

1 Like

Ok I added these lines:

_menuPoolMain:MouseControlsEnabled (false)
_menuPoolMain:MouseEdgeEnabled (false)
_menuPoolMain:ControlDisablingEnabled(false)

But now the camera is rotating in a submenu… how can I the disable the mouse for the submenu?

2 Likes

As I now the submenu has another name different from

So you will have somewhere a local (probably) where your submenu is stored, just rename it to it’s name if the submenu.

Edit: something like this:
local myname = createSubmenu()

Myname:MouseControlsEnabled

Of course the function will not be createSubmenu, but it’s a example

1 Like

Got it fixed! Thanks for your help! :slight_smile:

2 Likes

How do I disable the rotation?

1 Like

Thank you so much!!! This works for the EUP UI as well you just need to change _menuPoolMain to menuPool!

2 Likes

How did you do it?

Where did you put it in the ui?

1 Like

Did you find where to put this ?