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.

Drag object1, if condition is met snap to object2

Home Forums Puzzles Drag object1, if condition is met snap to object2

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #71559
    hamza3d
    Participant

    Hi,

    I have difficulty with snapping object. I have attached my puzzle image. When I drag my object I want it to snap to the other point. It is based on constraints. In my case I can drag because but it does not snap to the other value?

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

    Your variable moving-parts is not changed while dragging and is never less than 0.0131. The condition is not met.

    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.

    #71586
    hamza3d
    Participant

    My approach is wrong. I want my object to continue to slide on x-axis until is requested value. Right now if condition is met it just snaps to the value. So the variable needs to be continuously updated. Does the ‘get vector’ puzzle work in this case. How do I apply it in my scenario?

    #71596
    hamza3d
    Participant

    I solved it by using a get position puzzle of the object (store it in variable) in combination of every frame puzzle. :yahoo:

    #71600
    kdv
    Participant

    You could just place that get position puzzle right after the drag move puzzle, before the condition.

    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.

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