How to stop rotating object

  1. 6 weeks ago

    Hello I am constantly having a object keep rotating, it does not come back and stay where I finish it.
    On the second click it starts where it left off and keeps going. How do I complete the rotation so that when tapped again it does the same rotation. I'm very new thank you

  2. 3 weeks ago

    Hello has anyone have a possible solution.

  3. Angelo S

    Apr 23 Administrator

    Hello,
    the rotate action is always in "delta", meaning it rotates from the actual position.
    To achieve the behavior you want you need to add a "Run Javascript" action before the rotate action using the one-line code below:

    $(pubcoder.objects.myObject).rotate(0)

    Please replace "myObject" with your the object alias, that you can set in the inspector after selecting the object itself

  4. 2 weeks ago

    Hello I am not code friendly. I'm not even sure where to input this information.
    Is there no way in the interactivity panel to set the rotation back to the original position.
    So that the movement when clicked on does the same rotation sequence every time.
    Like a loop.
    Thank you for your assistance.

  5. If possible could you take a screen shot of the steps. I'm a visual learner I'm afraid.

  6. last week

    Angelo S

    May 6 Administrator
    • in the "selection" panel, with your object selected, insert "myObject" as alias of the object
    • in the interactivity panel, add a "run javascript" action and drag it before your "rotate" action
    • Doubleclick the "run javascript" action and paste the code provided
 

or Sign Up to reply!