- Home /
How I can change this command to my Keyboard?
I want to change the instruction to my keyboard. Right now I can rotate the 3D Robot-Arm using the hSliderValue. But I want to change it to my keyboard, I want to hit 2 keyboards so I can control the amount of rotation and the side of rotation into my keyboard.
function Update () { amtToMove = controlScript.hSliderValue * Time.deltaTime; if(controlScript.triggerGo == 1){
transform.Rotate(0, controlScript.hSliderValue *Time.deltaTime,0);
}
}
}
Thanks in advance for any advice!
Answer by cjmarsh · Jan 06, 2011 at 08:02 AM
It sounds like you want to create some keyboard controls for the user. If you select Edit>Project Settings>Input you can increase the size value at the top of the inspector panel by one in order to add a new control. Then map the + and - keys to your new axis and use that to influence the amount moved.
See the Input Script Reference for more details.
I want to control the amount of rotation and the side of rotation in my keyboard.
Thanks
You can make more than one custom input. With one for the amount of rotation (you can define multiple keys per input to create a custom axis) and another one to change the side of rotation, you should be covered.