Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohn Weland
42,478 PointsOdd movement
So I found something that is a little odd with the movement of the frog.
If I move left one time and then hit up and down repeatedly my frog with zig-zag up an down continually in a left hand direction (or right if I hit right first). Likewise if I hit up or down once and then toggle left and right repeatedly the frog will zig-zag left and right in the initial direction (up or down) is this intended?
What causes this?
1 Answer
Nick Pettit
Treehouse TeacherHi John,
This occurs because - if you press the keys quickly enough - the frog doesn't have time to turn towards either the up or down directions. Instead, the jumping animation plays (which is actually what moves the frog) while the frog is stuck between the two rotations.
If this is bothersome, a simple fix is to increase the rotation speed; i.e., the amount of time it takes to lerp from one quaternion to another.
John Weland
42,478 PointsJohn Weland
42,478 PointsOh not bothersome at all, just something I noticed and was curious as to why it works the way it does. I am really enjoying this course.