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 move and rotate function

Home Forums Puzzles drag move and rotate function

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #69261
    alissa
    Participant

    Hey guys
    I want to be able to move all objects in my scene and also have the option to rotate them. But if I do “drag move” I can’t also do “drag rotate”, right? Does anyone have a solution for that?
    Thank you!

    #69300

    Hi alissa,

    drag move and drag rotate puzzles should work together. You might give it a try.

    Chief 3D Verger | LinkedIn | Twitter

    #69301
    xeon
    Customer

    Well a solution is never quite as easy as the question as the answer depends on many other factors. Is this for a desktop with mouse and keyboard? Is it it for a touch screen, tablet or smart phone?

    Given the on drag move and drag rotate utilize the same inputs – mouse drag what differentiator are you going to use to allow the user to switch between the two states?
    Is there going to be a settings button, a hotkey, or a mouse key combination?

    Is the user going to drag move then rotate and be done? Can the users toggle between states of drag move and drag rotate? As an example, the first click/touch allows the user to drag, the second one allows rotation, the third goes back to move and the fourth back to rotate, etc.?

    Perhaps when the user clicks on the object a menu appears under the mouse to allow the user to choose what to do?

    You can use the When Dragged Over Puzzle and stick the DragMove and DragRotate inside it but it produces some very odd results but might be what you are looking for.

    • This reply was modified 1 year ago by xeon.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #69304
    kdv
    Participant

    But if I do “drag move” I can’t also do “drag rotate”, right?

    You can but not simultaneously (the result will be very odd). Just add two html buttons and switch between modes. Then add some logic to your puzzles.

    Also you can use different mouse buttons to move/rotate in case your app is not supposed to be used on mobile platforms.

    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.

    #69308
    alissa
    Participant

    Thank you guys for your answers! The best solution I think would be to have different mouse buttons for drag move and drag rotate because it’s not supposed to be for mobile platforms. Could you give me short example on how that would look like with puzzles? And is it also possible for a list of objects, or just individually?

    #69311
    kdv
    Participant

    is it also possible for a list of objects

    Possible.

    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.

    #69341
    alissa
    Participant

    Thank you for your help, that was what I was looking for! So could I also combine Drag Scale with this technique and assign it the middle mouse button? And are the numbers 1 and 3 for the mouse buttons or what do they mean?

    #69342
    kdv
    Participant

    which 1 corresponds to the left mouse button, 2 – the middle one, 3 – the right one. But there is a chance that FireFox won’t recognize this parameter (FireFox doesn’t understand a lot of things)…

    This variant will be a little more universal for browsers:

    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.

    #69363
    alissa
    Participant

    I tried it today and it’s working but I have 2 problems: It would be good to be able to rotate my objects on every axis but when I combine the rotations for one mouse button it rotates in a weird way. So I I think I have to separate them somehow for every axis. Could I combine it with a keyboard key? For example if you press x (and drag) it rotates on the x axis?

    The other thing: I have assigned the right mouse button for scaling my objects and it’s working fine but by click I get a dropdown menu of the bowser. Is there a way for me to disable it?

    #69365
    kdv
    Participant

    Could I combine it with a keyboard key?

    Why not? Add an event listener for keys and use logic puzzles to check what key is pressed.

    but by click I get a dropdown menu of the bowser.

    This happenes when the scene’s camera has no controls assigned.

    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.

    #69369
    alissa
    Participant

    Okay I will try it like this. Do you know where I can find an example for working with keys? I didn’t find really much online.
    I have Orbit selected for the camera settings in blender. Do I need to change something in verge3d?

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