void Update()
    movement = Input.GetAxisRaw("Horizontal");

private void LoackedUpdate()
        movement * Time.fixedDeltaTime * -moveSpeed
  • 3
    \$\begingroup\$ What do you need to remake, what should it do, what have you done, what is not working, what is the error? \$\endgroup\$ – Zibelas May 3 at 8:29
  • 1
    \$\begingroup\$ There's no Unity message called LoackedUpdate(). Did you mean to write FixedUpdate() here? Is your question about how to replace Input.GetAxisRae("Horizontal") (which reads keys/joystick input) with some kind of on-screen control or tilt control using the phone's IMU? Please edit your question to include details about what kind of input you want the player to use on mobile, then we can help you implement that input method. \$\endgroup\$ – DMGregory May 3 at 11:30
  • \$\begingroup\$ I did with another method but thx \$\endgroup\$ – V's gamedev May 4 at 12:38

Browse other questions tagged or ask your own question.