playerCtrl.FixedUpdate C# (CSharp) Method

FixedUpdate() public method

public FixedUpdate ( ) : void
return void
    void FixedUpdate()
    {
        float moveZ = Input.GetAxis ("Vertical");
        Vector3 movement = new Vector3(cam.transform.forward.x, cam.transform.forward.y, cam.transform.forward.z);
        rb.AddForce(movement * speed * moveZ);
    }