Skip to main content
edited body
Source Link
bob
  • 296
  • 1
  • 6

The Simple Approach: Sin and Cos

It looks like you're close. If you want to keep it simple, and assuming positive y is up and 90 degrees means go straight up and 0 degrees means go straight to the right, something as simple as y += speed * cossin(angle), x += speed * sincos(angle) should work.

The Simple Approach: Sin and Cos

It looks like you're close. If you want to keep it simple, and assuming positive y is up and 90 degrees means go straight up and 0 degrees means go straight to the right, something as simple as y += speed * cos(angle), x += speed * sin(angle) should work.

The Simple Approach: Sin and Cos

It looks like you're close. If you want to keep it simple, and assuming positive y is up and 90 degrees means go straight up and 0 degrees means go straight to the right, something as simple as y += speed * sin(angle), x += speed * cos(angle) should work.

Source Link
bob
  • 296
  • 1
  • 6

The Simple Approach: Sin and Cos

It looks like you're close. If you want to keep it simple, and assuming positive y is up and 90 degrees means go straight up and 0 degrees means go straight to the right, something as simple as y += speed * cos(angle), x += speed * sin(angle) should work.