i use addforce to move circle like bouncy ball
it looks good in the computer
but in mobile, it is not smooth
Vector2 touchPositon = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Vector2 playerPosition = this.transform.position;
Vector2 powerDirection = (playerPosition - touchPositon).normalized;
rigidbody2D.AddForce(powerDirection * power, ForceMode2D.Impulse);
https://youtu.be/65u6C0-cc3g?si=T88vLCj3AhXRod6G
zulo3d
October 12, 2024, 8:03am
2
Check your FPS. It’s probably running at 30 FPS on your phone. You may be able to remove the limit with this .
You can check the FPS using this script:
using UnityEngine;
public class FPSIndicator : MonoBehaviour
{
void OnGUI()
{
GUI.color=Color.green;
GUI.skin.label.fontSize=20;
GUI.Label(new Rect(10, 10, 100, 40), (1/Time.smoothDeltaTime).ToString("f0"));
}
}
thank you for your advice! i checked my fps and it was really 30 fps.
I used your link and solve this problem
now it is more smooth than last build
thank you so much!