Hot answers tagged

1

A common misunderstanding about FixedUpdate is that it runs with a regular rhythm in real time / wall time. ie. that Unity is watching the clock like a hawk, and when the real-time moment for the next FixedUpdate comes around, it puts everything on hold and immediately runs FixedUpdate on that exact moment, then waits for the next moment again. This is not ...


1

There are a couple things missing from your mesh generation code: You forgot to set any uv (texture) coordinates for all corners of your triangless. You might wonder why you need those when your material doesn't even have a texture. The reason is that the Global Illumination engine requires UV coordinates for calculating its lightmaps, even for shaders ...


1

If you want to linearly interpolate between two values, the jargon for that is "lerp". The basic idea is you pass a lerp function two values and a number between 0 and 1 that specifies how far between the two you want the current position to be. In this way you can control when a moving object hits the target by controlling when the value between 0 ...


1

One way to do it is to keep track of a state variable, like so: private bool soundReady; private void OnCollisionEnter(Collision collision) { if (soundReady && collision.gameObject.tag == "Ground") { soundReady = false; StartCoroutine(WalkSound()); } } IEnumerator WalkSound() ...


1

It took me 3 months on and off working on this issue, but I have figured it out. The issue lies with OpenVR/SteamVR. The head tracker of Steam has 2 camera's; head and eyes. This is where the instability comes from, for some systems (even if VR isn't used and toggled) it prevents the build from starting. It will not throw any errors. For some systems it will ...


Only top voted, non community-wiki answers of a minimum length are eligible