Hi all
I'm trying to reproduce an interactivity, which happens in a room that contains a table with fragments of it that revolve around a central axis.
What I have achieved does not satisfy me. The way in which I achieve the movements of each sector of the table is not very precise.
I wonder if it would be possible to implement a slider that would make the turn more precise. And to be able to stop this turn where the user wishes.
Thanks for the possible clues that you can provide me
Ramiro
http://www.ciudadcubica.com/m/
Question about an interactivity
-
-
Hi,
technically there should be surely many possibilities.
But before that you would need to define what exactly you want or need.Btw - nice example - reminds me on the old Indy 4 pc-game:
Best regards,
Klaus -
Many thanks Klaus
The idea is to be able to rotate each segment of the table, to face different texts in these segments.
The way I managed to do it is not very comfortable.
It would be ideal to be able to move each segment with the mouse or with a slider and be able to
brake the segment with greater precision at the desired point.
And thus fulfill the intention of interactivity -
Why don't you use drag and drop? You could click any ring and move the mouse to rotate it. Perhaps it would be much more precise than any slider.
-
Why don't you use drag and drop?
Any clue for documentation about drag and drop? -
Yes panomaster, that may be the solution,
I already tried. only that it only allows me to move a single ring.
I can not find the way to move each ring independently.
Any help, that allows me to move all rings, will be welcome
Ramiro -
Here's simple example:
http://www.ai360.pl/projekty/rotate_layer - just drag and drop rings. Of course it's only idea - action rotatelayer should be improved.
In order to move every ring independently you should put it into a container with rounded corners. Dont forget about setting proper zorder.
-
I already tried it following your instructions.
With alignment to the center it works well.
When I try to increase the scale from 0.6 to 1.1, with the buttons in the upper left corner to work with the bottom part, it does not work correctly. link attachment.
I tried to align to the left, which is where I really need it, but I did not succeedhttp://www.ciudadcubica.com/m1/
Thanks in advance
Ramiro -
You shouldn't use my actions - I took it from rotating hotspots example and it's not fit exactly to your example. I just wanted to show you an idea.
I can make complex example this evening. Please, wait a while.
-
OK. Here's the example:
http://www.ai360.pl/projekty/rotate_layer
It is based on one image (http://www.ai360.pl/projekty/rotate_layer/img/boy.jpg) so there's no need to create rings in PS. You can align rings as you wish (use combobox). There is also a few actions in context menu.
BTW nice idea - can be used as a sort of puzzle or access control.
-
wow!!!
Excelent. You really made it a real game. Amazing
You never know the dimension that a simple idea can reach in the hands of an expert.
I wonder what I need to zoom in
Ramiro -
I tried scaling rings layer and there were no problems. Just remember of using scalechildren. If you use single image, you can divide it into any rings you want. If you add bgborder to containers you will achieve the same effect as you have right now.
-
http://www.ai360.pl/projekty/rotate_layer
It is based on one image (http://www.ai360.pl/projekty/rotate_layer/img/boy.jpg) so there's no need to create rings in PS. You can align rings as you wish (use combobox). There is also a few actions in context menu.
Wow! - nice example and well done code!
Good idea of using rounded containers!
The only left features would be an inertia movement (when releasing) and a snapping to some fixed angles
Here some code to add how snapping eventually could work:
Quote<action name="rotatelayer">
stoptween(rotate);
...
asyncloop(pressed,
...
,
mod(rotate, 360);
div(rotate_snapped, rotate, 45);
Math.round(rotate_snapped);
mul(rotate_snapped, 45);
tween(rotate, get(rotate_snapped), 0.5, default);
);
</action>
Best regards,
Klaus -
Wow! Thank you Klauss. I have thought about this. And about snapping.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!