i want to move my rigidbody into 2 directions at the same time.
(0f, 0f, 1f) at the speed of 20f;
and at the same time (inputf, inputf, 0f) at the speed of 5f;
how can i do that?
i tried:
private void FixedUpdate()
{
if (IsPressing && MoveLegal)
m_Rigidbody.MovePosition(transform.position + m_Input * Time.deltaTime * 5f);
m_Rigidbody.MovePosition(transform.position + new Vector3(0f, 0f, 1f) * Time.deltaTime * Speed);
}
but since it only works the first time on MovePosition, the second one just wont work.
what should i do?
thanks in advance!