|DMS Consulting | sitemap | log in
|This is a free Spanglefish 1 website.
Walking with Java - Turn, Turn, Turn
My android could now walk, it could stop and it could start. The next requirement was turning. A slow change in direction while walking can be accommodated by slight changes in direction during the walking cycle. The same is true for slight inclines and descents but more about this later. What I wanted was to be able to turn on the spot.
This cycle was OK for a 45-degree turn but 90 degrees and larger turns did not look right when they were made up of several basic turns. The solution was to specify the number of 45 degree moves in a turn and then to include the appropriate number of the stage 2 turns. The second animation shows how this works.