ReworldDevs / ReworldScripts

Alpha phase Lua scripting for Reworld games
0 stars 0 forks source link

IsKeyDown() doesn't work as described #9

Open ReworldDevs opened 5 years ago

ReworldDevs commented 5 years ago

UserInputService.IsKeyDown(UnityEngine.KeyCode.W)

This function, based on its description in the documentation, should check if the key is currently pressed down. Currently, when put into an update function, it only returns true on the initial press of the key, and does not return true if the key is held down.

Kougamin commented 5 years ago

Well, IsKeyDown is exactly used to check if the key is currently pressed down, so I think there's nothing wrong about it. Could you send me more details about it?

ReworldDevs commented 5 years ago

I see, I thought it may have been to continuously detect if the key is pressed down. It appears to only detect the initial press. But I found another function to check continuous press, so it doesn't matter.