I’m having trouble accessing controller position data and the time that the data was last updated (for custom velocity calculations). I am using an ActionBasedController for this, but the XRControllerState’s time value is never updated (stays at 0). Does anyone have any idea how to solve this problem?
Hi!
To calculate speed, you niied Time.deltaTime (is the time passed from, last update. This means that this:
void Update()
{
transfomr.translate (Vector3.forward * Time.deltatime);
}
Is a constant speed independent of frame rate.
And accessing XR controller position, you must go look for tutorials, because its not like all other “simple gamObjects”. THey have like an anchor position, and relative position from the anchor… i dont remeber exactly. I recommend you to watch tutotrials specyfic for this.
Bye!