Home > Blockchain >  Train Simulator in Unity VR
Train Simulator in Unity VR

Time:10-15

I am trying to make a Train Simulator in VR in Unity. But as the Train moves, the grabbable objects tend to move backward when grabbed. This creates a jittery effect. This might be because transform Values changes on fast movement and unity get slow in updating it. Does anyone know anything about it?

CodePudding user response:

One possible solution to this problem is to use a Rigidbody on the Train object, and set the Interpolate setting to Interpolate. This will cause the Train object to interpolate its position and rotation, which should reduce the jittery effect.

CodePudding user response:

Is your train a rigid body? If so, having rigid bodies inside of rigid bodies is a mess when working with physics. If that is the case it's probably best to not make your train a rigid body. You should also check in what loops you handle your physics. Don't do this in the update loop. Try the FixedUpdate loop if you haven't. Sometimes you can also check if the LateUpdate does the job. But generally speaking. Physics goes into the FixedUpdate loop. Another thing you can try is to have a stationary train. In this case, the environment can move around you.

  • Related