|
@ -23,7 +23,8 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
|
public void Update(float modelTime, History<Input> input) { |
|
|
public void Update(float modelTime, History<Input> input) { |
|
|
radius += 150 * modelTime * input[0].Motion.Y; |
|
|
radius += 150 * modelTime * input[0].Motion.Y; |
|
|
radius = Math.Clamp(radius, 50, 200); |
|
|
|
|
|
|
|
|
radius = Math.Min(radius, 200); |
|
|
|
|
|
radius = Math.Max(radius, 50); |
|
|
float angleChange = modelTime * momentum / radius; |
|
|
float angleChange = modelTime * momentum / radius; |
|
|
angle += angleChange; |
|
|
angle += angleChange; |
|
|
float x = anchor.X + radius * (float) Math.Sin(angle); |
|
|
float x = anchor.X + radius * (float) Math.Sin(angle); |
|
|