- Home /
Question by
dancy166940 · Mar 09, 2014 at 02:55 AM ·
transformnewkeydown
C# trying to make character move a set distance when keydown
Hello,
Im new to C# and I'm trying to rebuild the frogger game, right now i have the character move by;
if(Input.GetKey(KeyCode.RightArrow)){
transform.Translate(Vector2.right * movementSpeedright * Time.deltaTime);
}
which works the frog moves but i want the character to only move maybe 10 pixies in the direction its going, opposed to it moving smoothy
thank you
Comment