diff --git a/.vs/Hexapod/v15/Server/sqlite3/storage.ide-shm b/.vs/Hexapod/v15/Server/sqlite3/storage.ide-shm index 87307a2..a9a3bad 100644 Binary files a/.vs/Hexapod/v15/Server/sqlite3/storage.ide-shm and b/.vs/Hexapod/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Hexapod/v15/Server/sqlite3/storage.ide-wal b/.vs/Hexapod/v15/Server/sqlite3/storage.ide-wal index 4b56f83..61fcf13 100644 Binary files a/.vs/Hexapod/v15/Server/sqlite3/storage.ide-wal and b/.vs/Hexapod/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Assets/Serial3.cs b/Assets/Serial3.cs index 2c8b2c9..5277af8 100644 --- a/Assets/Serial3.cs +++ b/Assets/Serial3.cs @@ -91,6 +91,11 @@ public class Serial3 : MonoBehaviour{ walk.centerRotation = rotation < 0.5f && rotation > -0.5f ? 0 : rotation; walk.walkDirection = (-1 * ConvertRadiansToDegrees((float) Math.Atan2(b2, b1))); + + float rotationabs = Math.Abs(walk.centerRotation); + float speed2 = ((6 / 3) * walk.walkspeed) + ((6/5) * rotationabs); + speed2 = speed2 < 6 ? speed2 : 6; + walk.speed2 = (int)(10 - speed2); } } }