Can I drag (position) and drag (rotate) independently?


#1

Sorry if this is a basic question but I am new to Hype, have no Javascript knowledge and I’m hoping it can be done without too much trouble though I can’t find a definitive answer anywhere.

I would like to be able to freely drag a rectangle anywhere on screen and, once it is in place, rotate it freely. At the moment I have made the rectangle draggable but I am having to control the rotation (timeline) with a separate slider.

Can the same object or group have independent drag controls? When I tried to add the second drag control to the rectangle (to control rotation) it rotated as it was dragged.

Cheers, muzz


(René) #2

It’s not possible to have to different drag-controls on one object. But If you dragged it to its destination, you can use a timeline to hide the dropped object (with drag-postion-control) and show a duplicate of the object (with drag-rotation-control).


#3

Thanks René, I will have to work out how to do that. The objects will be dragged to various “random” points, not a specific destination so I’m not sure if I can get that to work.

Thanks, muzz


(René) #4

You can use the drag to change the position and use a click to rotate.

drag-and-rotate.hypetemplate.zip (12.2 KB)


#5

Thanks again René, that might work for me.

Cheers, Murray