Results 1 to 3 of 3

Thread: Sprite Animation Backwards ... possible?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I would do it with sine-wave, because it makes smooth moves.

    Hope these bits help, its not ready code so you would have to adapt it:
    Code:
    const ToRad = 0.0174532925199433;  //  PI / 180 = Deg To Rad
    ...
    Counter:=(Counter+1) mod 360;
    Moon.AnimPos:=72+72*sin(Counter*ToRad);

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Hi Robert, welcome to PGD.

    I'd like to ask you to please put your code into proper code blocks so it's easier to read in the forums. Thanks.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •