• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Rotation of an object

Contributor ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

...

Hello !...

I'm starting to work on the clock !... (What a challenge !... )

I already manage to do many great things... But I have a problem with the rotation of the hands.

I want the students to be able to rotate the hands clockwise and anti-clockwise.

So I made a "+" button to rotate the minute hand clockwise. I use the cpt effect "rotate 6°" for each minute. And it works fine.

I also made à "-" button to rotate the same hand anti-clockwise (using also the cpt effect "rotate -6°"), and when I did so, the hand returns to its original (vertical) position before the rotation !...

So for example, if I rotate the minute hand to 20 using the "+" button, and then I want the hand to be on the 19, if I click on the "-" button, the hand returns to its original position before rotating... And this is not what I want !...

Don't know If I'm crystal clear !... ...

I will make some screenshots !...

clock_01.png

And I clik on the "-" button one time this happens :

clock_02.png

So the minute hand returns to its original position before rotating, and I want to avoid that !...

Is this possible ??...

...

I also made a button to reinitialize everything (Remise à zéro) but I don't know how to make the hands returning to their initial positions (vertical)...

...

And as I'm here another question :

I found the cpt variables for the hour and the minute... but not for the second !... Is it possible to get it ?...

...

Thanks in advance for your help !...

...

Views

283

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

How do make the clock hands rotate? I would add custom states for the hour and minute hands and display the correct state whenever you increase/decrease the minute and hour variables. That would avoid having the hands to snap back first before they rotate. I had built an analog clock a long time ago, see here the second example: http://dev.keypointlearn.com/blog/clock/ 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

...

I finally manage to do it... but with 60 conditional actions !!!... (1 for each minute you have guessed !...)

I created a variable called "Minute", and my minute hand is called "G_Aiguille".

So one of the action is for example :

If Minute = 12

Rotate "G_Aiguille" by 72 (6x12)

Luckily for the hour hand, I will have only 12 conditional actions !...

...

Thank you KeyPoint for your answer, but I don't see the seconds on your project ?

...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

What about using the While loop?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

...

Hello Lily !...

"While loop" ??... Never used it !... Dont' even know where to find it !... 

PS : If you can answer in Molière's language, it could be nice !... 

...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

D'accord. Je ne me rappelle pas la version que vous utilisez, ce 'loop' n'existe que dans la version 10 (CP2017).  Voici un blogue et un 'movie' que j'ai créé pour illustrer cette nouvelle 'condition':

http://blog.lilybiri.com/playing-a-dice-game-using-while-loop

Game

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

...

(Toujours aussi prompte à nous aider !...

C'est un vrai plaisir de savoir qu'on peut toujours compter sur toi !... (Je me permets le tutoiement, car depuis que je te lis ici, quasi quotidiennement,  je te considère comme une "amie" !)

Définition d'un ami : qqun sur qui l'on peut compter !!... )

...

J'ai rapidement jeté un oeil sur ton blog... J'avais d'ailleurs déjà parcouru cet article, mais j'avoue que cela reste flou pour l'intégrer dans mon projet... Je suis en "vacances", tout comme mes neurones qui se refusent à une traduction efficace !... et il est trop tard pour m'y mettre sérieusement ce soir...

En attendant, je viens juste de rendre accessible le résultat  de ce projet sur le net :

http://soutien67.fr/math/niv02/theorie/pages/Heure_T_02/

Et comme je vais sans doute réutiliser mon action dans d'autres projets sur le même sujet, ce sera enfin pour moi l'occasion de tester les actions partagées !!...

Bonne soirée et @ très vite sans doute !...

...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

LATEST

Si 'tu' trouve une potion magique qui me procure 36hr par jour, je commencerai à poster des blogs en français. 

J'avais presque eu un job d'entraînement de Captivate à Lyon, mais finalement ils ont préféré un autochtone Cela aurait été une occasion pour traduire quelques articles. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources