j0l
New vMember
Posts: 8
|
Post by j0l on Oct 18, 2017 10:37:31 GMT
Hey there, what i would like to achieve is when pressing alt to Lock /block player input when entering a ui menu. Currently what i got is a ui drawn onto a 3d model, when i enter the ui range i can interact /click on the items in the canvas but the player keeps performing attack animations.. Is there a simple way to stop the player from playing animations when entering a ui/canvas. Any help/advice from someone Who knows invector would be greatly appreciated. Thx
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Oct 18, 2017 10:54:07 GMT
So actually you can do it by turning off Invector, and turning on that 3D object, like so: ScriptName : Monobehavior Void Update () { If (Input.GetKeyDown (“A”)); { Invector character controller = false; 3D game object = true; } else if (!Input.GetKeyDown (“A”)) { Invector character controller = true; 3D game object = false; } Kind of pseudo code but I think you get the idea Hope it helps!! Cheers! NukeRaspberry
|
|
j0l
New vMember
Posts: 8
|
Post by j0l on Oct 18, 2017 19:23:08 GMT
thx.. ofc i had to overcomplicate the thing, i ended up adding a event trigger to the gui itself and just added on pointer enter lockinput and on exit i turned it off, anyways thanks
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Oct 18, 2017 21:07:00 GMT
No problem!! :D
Cheers! NukeRaspberry
|
|
|
Post by tharindu on Oct 19, 2017 1:41:54 GMT
thx.. ofc i had to overcomplicate the thing, i ended up adding a event trigger to the gui itself and just added on pointer enter lockinput and on exit i turned it off, anyways thanks I believe what you did is the right way to go as well.
|
|