Binding On KeyPress
by Kareem Glover · in Torque X 2D · 11/08/2009 (10:17 pm) · 2 replies
I am working on the keyboard input for a puzzle game and I noticed that they keymapping is too responsive. As long as the key is pressed it is being registered as a move.
Any ideas on the format for me to implement onkeypress. All the inputMap examples I have seen are not measuring that the key is active, not its initial press.
inputMap.BindMove(keyboardId, (int)Keys.Right, MoveMapTypes.StickDigitalRight, 0);
-Kareem
Any ideas on the format for me to implement onkeypress. All the inputMap examples I have seen are not measuring that the key is active, not its initial press.
inputMap.BindMove(keyboardId, (int)Keys.Right, MoveMapTypes.StickDigitalRight, 0);
-Kareem
#2
Thanks. That is just what I was looking for. Also picked up a quick lessons on delegates to boot.
-Kareem
11/09/2009 (12:57 am)
Henry,Thanks. That is just what I was looking for. Also picked up a quick lessons on delegates to boot.
-Kareem
Torque 3D Owner Henry Shilling
Smokin Skull
input.BindCommand(gamepadId, (int)XGamePadDevice.GamePadObjects.LeftThumbLeftButton, sitckLeftOn, sitckLeftOff);
etc...
I think that is what you are looking for.