Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    I would like to discuss my Idea

    Work In Progress
    7
    21
    758
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mechanical last edited by

      Right now I have a mathematical problem.

      I have PlayerSprite and Cursor Sprite
      I want to launch a 3rd Bullet Sprite
      At PlayerSprite location and I want it to fly towards the Cursor Sprite.

      For that I need a formula to rotate the Sprite towards the Cursor and I don't know how to achieve that.

      1 Reply Last reply Reply Quote 0
      • vinicity
        vinicity F last edited by

        To get the angle to a specific point, you will need to use atan2(). Take a look at Wikipedia:
        https://en.wikipedia.org/wiki/Atan2

        1 Reply Last reply Reply Quote 0
        • M
          Mechanical last edited by

          Whoa that reminds me of my school days.

          I need to get better in math, Im just seeing Greek symbols xD

          1 Reply Last reply Reply Quote 0
          • pianofire
            pianofire Fuze Team last edited by

            There is an example here that uses it to set a sprites rotation angle:

            https://fuzearena.com/help/view/setSpriteSpeed

            1 Reply Last reply Reply Quote 0
            • vinicity
              vinicity F last edited by vinicity

              I had some time over on my lunch break, so I cooked up a small demo for you.

              ID: NXK76GP92C

              It is still in "pending", but you should hopefully be able to download it shortly.

              1 Reply Last reply Reply Quote 4
              • M
                Mechanical last edited by

                I will look into that this evening, I'm at work atm

                1 Reply Last reply Reply Quote 0
                • vinicity
                  vinicity F last edited by

                  Do that! (It seems to be live now as well!)

                  1 Reply Last reply Reply Quote 0
                  • PickleCatStars
                    PickleCatStars F last edited by

                    Atan2() is pretty sweet. I used it for a twin stick shooter once.

                    1 Reply Last reply Reply Quote 1
                    • M
                      Mechanical last edited by

                      Twin stick shooter sounds pretty much like the game I'm coding :D
                      I'm getting CS2D vibes

                      1 Reply Last reply Reply Quote 0
                      • vinicity
                        vinicity F last edited by

                        I just love Fuze. From getting an idea in my head (a rotating tank and a crosshair) to having a working demo, and then sharing it with others took like 20-25 minutes. That is pretty amazing and shows how easy Fuze is to work with once you get used to all its little idiosyncrasies!

                        pianofire 1 Reply Last reply Reply Quote 5
                        • pianofire
                          pianofire Fuze Team @vinicity last edited by

                          @vinicity Can we quote you on that?

                          1 Reply Last reply Reply Quote 2
                          • vinicity
                            vinicity F last edited by

                            Sure, go right ahead.

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post