- Home /
Question by
alexander_q · Mar 27, 2014 at 02:23 AM ·
androidtouchsmoothdelta position
Smoother Android Movement with deltaPosition
I'm using this code to move me around smoothly on a vertical shooter
if (Input.touchCount >=1 && Input.GetTouch(0).phase == TouchPhase.Moved) {
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
transform.Translate(touchDeltaPosition.x * speed*Time.deltaTime, touchDeltaPosition.y * speed*Time.deltaTime, 0);
}
I've been playing with the speed parameter, and I can get it fairly manageable to control, but it still seems very... Jumpy. Can you suggest anything that might smooth it out?
Comment
Jumpy movement unfortunately can be the result of many things. Is this a rigidbody that you are moving?
Your answer
![](https://koobas.hobune.stream/wayback/20220613141254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Touch Button animation 0 Answers
Changing level on Android 3 Answers
Tap Control on Android 1 Answer
Java Plugin : Button added on UnityPlayer Activity -> touch not working 2 Answers
Android GUITexture Touch 0 Answers