This commit is contained in:
@@ -64,8 +64,8 @@ func (a *Animation) updateMarioPosition() {
|
|||||||
|
|
||||||
// Calculate new position using parametric ellipse equations
|
// Calculate new position using parametric ellipse equations
|
||||||
t := a.mario.angle
|
t := a.mario.angle
|
||||||
marioX := centerX + a.mario.a*math.Cos(t)
|
marioX := float64(centerX) + a.mario.a*math.Cos(t)
|
||||||
marioY := centerY + a.mario.b*math.Sin(t)
|
marioY := float64(centerY) + a.mario.b*math.Sin(t)
|
||||||
|
|
||||||
// Update angle to move along the ellipse
|
// Update angle to move along the ellipse
|
||||||
a.mario.angle += 0.1 // Adjust speed as needed
|
a.mario.angle += 0.1 // Adjust speed as needed
|
||||||
|
|||||||
Reference in New Issue
Block a user