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.

Click event but not on drag action

Home Forums Bug Reports and Feature Requests Click event but not on drag action

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #66466
    Fabulous FOUR
    Customer

    Hi,
    Is it possible to distinguish between 2 events, Drag and Click?
    Le’s take the spinner demo: https://cdn.soft8soft.com/demo/blender/spinner/spinner.html
    If i drag but my starting drag location on the screen is on a color bubble, it will also click on the bubble.
    I just want to drag, not to click.
    If I want to click, I click on the bubble without dragging.
    There is no “Exclude Drag” on the click event. Or maybe there is another solution?
    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #66473
    kdv
    Participant

    Those puzzle both require clicking but in a different way

    That’s how you can get rid of when clicked and use when dragged over both for dragging and clicking

    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.

    #66481
    Fabulous FOUR
    Customer

    I’m looking at your solution and come back to you, thanks

    #66484
    kdv
    Participant

    For one ball

    For all balls

    https://v3d.net/nda

    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.

    #66488
    Fabulous FOUR
    Customer

    Thanks! Now there is no click event when start dragging! And I can manage the click nicelly. Really useful tip!

    I’ve tried to keep the camera panning on the “move: do” but I can’t reach this result. Any idea ?

    ps. I don’t have the “dragged object” puzzle nor the option on “drag move” puzzle. Why?

    #66489
    kdv
    Participant

    I’ve tried to keep the camera panning on the “move: do” but I can’t reach this result. Any idea ?

    The camera controls are intentionally disabled when you try to drag some object.
    You can enable the camera controls back but the result will be opposite to what you are expecting.

    https://v3d.net/nda

    I don’t have the “dragged object” puzzle

    That’s from my plugin. You don’t need it.

    nor the option on “drag move” puzzle.

    That’s a new puzzle introduced in 4.5.0 pre1

    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.

    #66493
    Fabulous FOUR
    Customer

    Our message are crossing ;o) I’m trying your solution…

    I really appreciate the quality of your answers !

    The camera controls are intentionally disabled when you try to drag some object.

    So in the case of the spinner, it’s not possible to manage the click as you did and keep the camera panning?

    In a game like Teapot Heater (https://cdn.soft8soft.com/demo/blender/teapot_heater/index.html), you can drag the camera with touch/click. But when you start your drag motion on a clickable objet, the click event is triggered. It is possible to avoid the click with your tip but the camera can’t be dragged then?

    #66496
    kdv
    Participant

    Read above. Check up the app.

    In a game like Teapot Heater

    You mean you don’t want objects to be clicked when you start the camera rotation with the cursor over the objects? Use “double click/tap” for triggering.

    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.

    #66498
    Fabulous FOUR
    Customer

    Sorry, certainly my english is bad. Like in Spinner or Teapot Heater the “drag” word was not for the objects, but for the action the user is doing. The drag action I talk about is : Touch/Click -> Move -> Release. I agree with you, in these games, the drag action is only panning the camera, not moving the objects.

    With the Spinner game, when you’re moving the camera (Touch/Click -> Move -> Release), it’s not good to have a click triggered when your drag action starts on a clickable object. But you should be able to move the camera anyway.

    I tried your solution and I confirm the click is well managed but It only moves the objet.

    Attachments:
    You must be logged in to view attached files.
    #66499
    Fabulous FOUR
    Customer

    Use “double click/tap” for triggering.

    That’s the solution I’m using for now, but it’s not the best one. I’m looking for an interaction I found in games like “The Room” where you can move your camera without triggering the click.

    #66502
    kdv
    Participant

    You’re expecting too much. How should the app understand what you are going to do if you pressed the button when the pointer is over the draggable object? Maybe you want to rotate the camera without dragging? Or the next time you want to drag without rotating? That’s why the controls are disabled when you click on draggable objects. If you enable them you will drag an object and rotate the camera at the same time.

    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.

    #66503
    Fabulous FOUR
    Customer

    That’s the point. I don’t want to drag the object. I just want to move the camera. I wasn’t clear.

    #66505
    Fabulous FOUR
    Customer

    if you pressed the button when the pointer is over the draggable object? Maybe you want to rotate the camera without dragging?

    if you pressed the button when the pointer is over the clickable object :
    – If you move -> rotate the camera, like if you don’t press the button over the clickable object.
    – If you release the button -> click

    #66506
    kdv
    Participant

    Then you shouldn’t have talked about dragging initially meaning the scene’s camera rotation )))

    And it’s easy to do using when dragged over (when clicked won’t do).


    https://v3d.net/nda

    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.

    #66508
    Fabulous FOUR
    Customer

    Bingo! Sorry for my bad english and well done. Thanks a lot!

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