Hi, Im really new to Unity. Im searching this for 3 days, and go nowhere. My box2d auto run right & jump smoothly now. But I can’t get it rotate 360 from starting jump to land like image. I read & tried so my methods still can’t get it right. Below a part of my code, could you please help me out a little bit? Thanks:
public float speed = 5f;
public float jump = 8;
public bool grounded;
private Rigidbody2D rb2d;
void Start () {
rb2d = gameObject.GetComponent<Rigidbody2D> ();
}
void Update () {
rb2d.transform.Translate (Vector3.right * speed * Time.deltaTime);
if(grounded == true && Input.GetKey (KeyCode.RightArrow)) {
rb2d.velocity = new Vector2 (speed * 8 * Time.smoothDeltaTime, jump);
}
}