Problems to use GetKey
Options
Hi there,
i have a problem with my script. http://hastebin.com/layocasusi.avrasm
If i press the Crouch Button once, it doesnt seems to be applied.
I need to press it 2 or 3 times, that my character starts to crouch.
I made some Debug tests and found something interesting.
The first two Debugs are called from the SimulateController() function.
The last one is called in the Update() function.
It seems, when i press the crouch button, i miss some frames...
I want crouch on toggle, not when im holding the crouch button, just pressed once and the player should crouch.
The scripts worked before in singleplayer mode. (without bolt)
i have a problem with my script. http://hastebin.com/layocasusi.avrasm
If i press the Crouch Button once, it doesnt seems to be applied.
I need to press it 2 or 3 times, that my character starts to crouch.
I made some Debug tests and found something interesting.
The first two Debugs are called from the SimulateController() function.
The last one is called in the Update() function.
It seems, when i press the crouch button, i miss some frames...
I want crouch on toggle, not when im holding the crouch button, just pressed once and the player should crouch.
The scripts worked before in singleplayer mode. (without bolt)
0
Comments
-
0
-
My code is just the same like the tutorial's one.
I just missed to put the update function on hastebin.
And getKeyUp seems to not be, what i want.0 -
Ok try removing the PollInput from simulatecontroller and just keep it inside of Update()
Also FYI if you want your player to stay crouched you need to put some logic in there to do like setting a bool or something.0 -
Thanks i tried this out, it doesnt work.
And like i said, i made at first a non bolt version of my controller, than converted it to use it with bolt. And in the non bolt version it worked.0