Hi, i have a little problem with my character movement in unity, actually when it’s move the edges become a little blurred for the movement:
this is a video with movement:
and this is a video without movement:
as you can see when the sprite is not moving the image it’s fine but when i apply some movement the edges become blurred.
there is the code for the movement:
public class RocketScript : MonoBehaviour
{
public float speed = 1f;
Rigidbody2D rb;
Animator anim;
int direction = 1;
private void Start()
{
print(Application.targetFrameRate);
Application.targetFrameRate = 100;
//print(Application.targetFrameRate);
//transform.Rotate(0, 0, 30);
rb = GetComponent<Rigidbody2D>();
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
if(Input.GetTouch(0).phase == TouchPhase.Began)
{
anim.SetInteger("direction", direction);
direction = direction * -1;
}
}
void FixedUpdate()
{
rb.position = new Vector3(0, 0, 0);
if (direction < 0)
{
rb.AddForce(new Vector2(200f,0));
}
else
{
rb.AddForce(Vector2.left * speed);
}
}
}
Help me please,Thanks in advanced.