Hi, it’s my code
void Update () {
if (Input.GetKey (KeyCode.J)) {
GetComponent<Rigidbody2D> ().velocity = new Vector2 (5,0);
}
}
but the problem is that we should get inputs in Update and use all object that have Rigidbody2D in FixedUpdate
how can I get input in Update and then use RigidBody2D to move the object in FixedUpdate?
???