- Home /
Messed up character controls on Android Platform
I am working on a small game. I have a basic movement system based on jump:
if (Input.GetMouseButtonUp(0) && checkGrounded())
{
rb.velocity = new Vector2(horizontalSpeed, jumpSpeed);
}
else if (Input.GetMouseButton(0))
{
checkLeftRight();
if (jumpSpeed <= maxJumpValue)
{
jumpSpeed += increasingAmount;
}
}
else
{
jumpSpeed = 0;
}
Character jumps if you release your finger (or mouse) on the screen. And as you hold down its increase the height of jump. This code works perfectly on Unity Editor, with no delay and instant respond. But when i build as APK and run on a Android Device, the controls feels WEIRD and laggy. I mean when you held down its like increasing jump speed with a bit delay. My game is a platform game so if controls doesn't respond instantly there will be a problem. I'll be glad if you help.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
How can I add air control to my 3d platformer's Character Controller? 0 Answers
How to switch animation controllers dynamically? 1 Answer
Sailing Ship Control Script Help 1 Answer
how can I make the character jump more by holding the jump button in this script? 1 Answer