- Home /
Question by
TheMK-_- · Feb 11, 2018 at 07:59 PM ·
movementtransformsmoothtransition
Smooth Movement using transform for fixed movement amount?
Basically I have a block I want to move 2 grid spaces when a key is pressed and it is working as intended but its not smooth i.e. it jumps position. So how can I get it smooth without setting a start and end point?
My current code
public void Update()
{
if (Input.GetKeyUp(KeyCode.RightArrow))
{
transform.position += new Vector3(2, 0, 0);
}
}
Thanks in Advance for any hep or ideas
:)
Comment
I myself don't know how to do coroutines but that's definitely the answer. You should look into it.