Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Jitter moving a simple object using Unity in VR

ttgjouttgjou Posts: 1
edited October 2019 in Unity Development
I have a problem that I don't know because there are so few people who suffer it too.
I am making a game where I need to move an object over the scene from one point to another using code.
The problem is that when I see the object move using the VR glasses, I see the movement as with jitter and the faster it moves, that jitter gets worse.
I use Unity 2019.1.14

The code is very simple:

public class DesplazamientoPruebas : MonoBehaviour
    public Transform[] puntos;
    public int contador = 0;
    Vector3 posicion;
    // Start is called before the first frame update
    void Start()
        Application.targetFrameRate = 90;

        posicion = puntos[contador].position;

    // Update is called once per frame
    void Update()

       if( Vector3.Distance(transform.position,puntos[contador].position)<2 )
            if (contador > 1)
                contador = 0;
            posicion = puntos[contador].position;
        transform.position = Vector3.MoveTowards(transform.position, posicion, 0.2f);

This script is assigned to the object and I only observe how it moves when I start the game.

I have tried to:

  • Modify the time in the game preferences to leave it as 1/90 or 1/60.

  • Change all playerSetting parameters following the Oculus recommendations.

  • To move the object I tried Update () with time.deltatime
  1. FixedUpdate with Time.fixedDeltaTime
  2. LateUpdate with time.deltatime

  • I have tried as functions:
  1. Transform.Translate
  2. Vector3.Lerp
  3. Verctor2.MoveTowards

All with the same result . It doesn't happen to you?
I would appreciate a help because I can't think of what else to do.

Thank you very much!!


Sign In or Register to comment.