Navigation

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

    Sprite movement to 360 degrees ?

    Coding
    2
    2
    180
    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.
    • BildoCZ
      BildoCZ last edited by

      Hello. If I want to move the sprite in different directions (360 degrees), do I have to do it through (sin), (cosin), or is it a direct function?

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

        @BildoCZ Have a look at setSpriteSpeed: https://fuzearena.com/help/view/setSpriteSpeed This sets the sprites speed in the x and y directions. The example uses some trigonometery (atan2) to point the sprite in the right direction.

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