We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Problem with drag move shortcut

Home Forums Puzzles Problem with drag move shortcut

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #69533
    alissa
    Participant

    Hello,
    I tried to specify the direction of dragging for my object with shortcuts für each axis. It works fine the first time, but when after moving it along the x,y and z axis once the shortcuts don’t work anymore and it just moves along the axis I chose last.
    Am I missing something?

    Attachments:
    You must be logged in to view attached files.
    #69549

    Hi alissa,

    the problem in your puzzles is that you create the drag event setups every time the user presses the keys. Instead, the puzzles ‘when dragged over’ should be placed outside the ‘keydown’ puzzle. In the ‘keydown’ puzzle, you should set a variable per each direction and then check this variable inside the drag puzzles. You might also use the ‘keyup’ puzzle to unset the variable. Unfortunately I don’t have time to create an example for you but hope this explanation helps.

    Chief 3D Verger | LinkedIn | Twitter

    #69552
    kdv
    Participant

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #69622
    alissa
    Participant

    Sorry for the late answer but thank you, it’s working.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.