omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How do I make arrows fly in a new arc?

    Pythonista
    help node scene module scene
    2
    2
    2107
    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.
    • Drizzel
      Drizzel last edited by

      Hi guys,
      I'm building a game with the scene module,
      and I figured out how to make sprites move in a straight line. Does anyone know if I can also make them move in an arc, like an arrow? And can I make a sprite move at a fixed speed, so that it doesn't move to a certain point in 5 seconds, but that it moves at a speed of 500px/second? Because action.run_action(move_to, x, y, time) has both of these issues

      Thanks :)
      Drizzel

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        You basically have to implement a physics system with a gravity component.

        Here is a simple example. Change the initial velocity to change angle of arc.
        https://gist.github.com/563cf7498dda79c3ca824b12a9103e5a

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors