I know there are mulitple threads about this and I’ve been through almost every one of them for hours now, but either the solution doesn’t work (the object will not move at all) or the code just comes up with an error.
I am trying to move a rigidbody object quickly up by clicking 1 on the keyboard (not instantly, just quickly), and then come back down to where it was, although I am having a lot of trouble doing so. Honestly, I don’t have much code to start with, but this is what I’ve done so far.
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
{
}
}
Any help would be greatly appreciated as I’m new to all this.