Tag Info

Hot answers tagged

5

Unity supports two methods of animation interpolation: Quaternion interpolation (the default) Euler angle interpolation (what you're expecting) Quaternion interpolation is smoother, but doesn't react gracefully to a single keyframe which rotates more than 180 degrees -- as you're seeing, it picks the shorter path, no matter what your intention was. To ...


1

Where do I create levels for my game?     File -> New Scene Do I create individual objects in 3ds Max and transfer them to Unity, or do I create the whole level in 3ds Max and transfer everything at once to Unity? Short answer: Create individual objects and then transfer them to unity. This is called modular design. Long ...


1

Your problem is that you're doing this: glPushMatrix(); glTranslatef(0, 0.03 * dt, 0); // (...) glPopMatrix(); The offset created by the glTranslatef() command only exists between the glPushMatrix and the glPopMatrix; it doesn't retain its values from previous frames; the offset goes away forever as soon as the matrix is popped. So assuming that dt ...


1

There's an easy solution - don't translate with a matrix. Since you're using immediate mode, it's an incredibly easy matter to simply offset the texture coords however much you'd like. EG, glTexCoord2f(1, 0.03 * dt); This will, of course, not be so easily done when you learn about the OpenGL Core Profile, which is highly recommended to be used. But until ...


1

Let's unpack this, as it looks like you might be confusing Animator & Animation GetComponent<Animator>().animation.clip.length GetComponent<Animator>() returns an Animator component attached to the same game object as this script instance, if one exists. .animation tries to access a member called "animation" of that Animator object. ...



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