Hi!
I am making a simple 2,5 space shoter. I have noticed a strange behavior when moving an object: the object dont moves smoothly and do some jerks every 1-2 seconds.
The code what I am using for moving the object is:
public float speed;
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
rb.velocity = transform.right * speed;
}
I tried to move the object like that:
public float speed;
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void Update()
{
rb.transform.Translate(transform.right * Time.deltaTime * speed);
}
But the object still moves jerkly.
Setting off the Vsinc and using interpolate on the rigidbody make the move smoothly, but still doing jerks.
Any solution to fix that problem?
Thanks in advance.