# Clock project

**URL:** <https://forum.snap.berkeley.edu/t/clock-project/5109>\
**Category:** Snap! Editor\
**Tags:** clock, block-help\
**Created:** [January 10, 2021, 8:41pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109 "2021-01-10T20:41:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![feketetcool](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/feketetcool/32/7595_2.png) [@feketetcool](https://forum.snap.berkeley.edu/u/feketetcool)\
**Post date:** [January 10, 2021, 8:41pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/1 "2021-01-10T20:41:19Z")

</div>

Hello,  
I am making a Clock project that shows you an analogue clock with the current time to the second, but there is a slight problem. I have only put script into the second hand _(the red one)_ yet, but I have put all the right code in (oh yeah, if there is a problem in my code, please let me know 😉

**What's problem you are encountering?**  
The second hand doesn't turn as if the end of it is connected to the middle of the clock face, and I don't know why. I've seen some other projects like mine, and they don't seem to have the same problem.

**What have you tried that didn't work?**  
I have tried using 2 different blocks to solve the problem, these are: ![Analogue Clock script pic](https://cdn.forum.snap.berkeley.edu/original/2X/e/e1e3dbb262c18e77726b1ed59cd6c56aaa4bc9db.png) and ![Analogue Clock script pic (1)](https://cdn.forum.snap.berkeley.edu/original/2X/9/9e51866826b0eb5eb14c8d00d884d8f2cf2548c7.png)  
None of them seem to work. 🤨

**Post a project example, link, or screenshot:**  
Here is the link: [Clock Project](https://snap.berkeley.edu/project?user=feketetcool&project=Analogue%20Clock)

Is there a problem with my sprite, my code or something else?  
Many thanks 🙂

---

<div class="post-metadata">

**Author:** ![dardoro](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/dardoro/32/14708_2.png) [@dardoro](https://forum.snap.berkeley.edu/u/dardoro)\
**Post date:** [January 10, 2021, 9:01pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/2 "2021-01-10T21:01:52Z")

</div>

![rotation](https://cdn.forum.snap.berkeley.edu/original/2X/d/d41f0f200b68a98beadfe9a20381f4ef0e4c3466.png)  
Sprite rotation center must be set.

---

<div class="post-metadata">

**Author:** ![silver\_star](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/silver_star/32/9307_2.png) [@silver\_star](https://forum.snap.berkeley.edu/u/silver_star)\
**Post date:** [January 11, 2021, 4:15pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/3 "2021-01-11T16:15:03Z")

</div>

![Analogue Clock script pic](https://cdn.forum.snap.berkeley.edu/original/2X/8/8cfed604c1f6baf8f855c894696ebdd3ec046214.png) ![Screenshot 2021-01-11 161404](https://cdn.forum.snap.berkeley.edu/original/2X/9/93f1a71727f227070a40ac27de32650d995e251d.jpeg)

---

<div class="post-metadata">

**Author:** ![loucheman](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/loucheman/32/43319_2.png) [@loucheman](https://forum.snap.berkeley.edu/u/loucheman)\
**Post date:** [January 11, 2021, 7:40pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/4 "2021-01-11T19:40:57Z")

</div>

Another way to change the sprite rotation center (pivot)

1. Right click on the sprite and select **pivot**  

2. Set the pivot by dragging it at the best place...  

Somes remarks for you:

 ![image](https://cdn.forum.snap.berkeley.edu/original/2X/3/3768b82f6cf1422cf26bf49fe15a7ce5eb52f037.png)  
(1000 operations is an example: you don't need warp here...)

Variables:

 ![image](https://cdn.forum.snap.berkeley.edu/original/2X/6/6943a84ad661eadb180e7865a8717a0c55e9b4bf.png)

This run perfectly!

 ![image](https://cdn.forum.snap.berkeley.edu/original/2X/2/22efbbc5034a0cbfaeb7860f6a0697e4d7205e2f.png)

**Good job, you are on the right way !**

I can share one of my project if you want to see 3 different clock: 1 dont have any sprite (all drawing), 1 is like you with sprite and the last one is digital

---

<div class="post-metadata">

**Author:** ![feketetcool](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/feketetcool/32/7595_2.png) [@feketetcool](https://forum.snap.berkeley.edu/u/feketetcool)\
**Post date:** [January 11, 2021, 7:43pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/5 "2021-01-11T19:43:01Z")

</div>

Thanks for the advice!

---

<div class="post-metadata">

**Author:** ![feketetcool](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/feketetcool/32/7595_2.png) [@feketetcool](https://forum.snap.berkeley.edu/u/feketetcool)\
**Post date:** [January 22, 2021, 8:05pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/6 "2021-01-22T20:05:34Z")

</div>

thanks

---

<div class="post-metadata">

**Author:** ![feketetcool](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/feketetcool/32/7595_2.png) [@feketetcool](https://forum.snap.berkeley.edu/u/feketetcool)\
**Post date:** [January 22, 2021, 8:06pm UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/7 "2021-01-22T20:06:05Z")

</div>

yes, @loucheman I will delete those variables I don't use the at all 🙂

---

<div class="post-metadata">

**Author:** ![loucheman](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/loucheman/32/43319_2.png) [@loucheman](https://forum.snap.berkeley.edu/u/loucheman)\
**Post date:** [January 23, 2021, 12:36am UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/8 "2021-01-23T00:36:42Z")

</div>

This is my project, as i ask you earlier, it's in french !

If you don't understand, just ask me, i will do a traduction for you (or google may help you! (like me))

> **[Horloge by loucheman | Snap! Build Your Own Blocks](https://snap.berkeley.edu/project?username=loucheman&projectname=Horloge)**
>
> The Snap! Community. Snap! is a blocks-based programming language built by UC Berkeley and used by hundreds of thousands of programmers around the world.

---

<div class="post-metadata">

**Author:** ![feketetcool](https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/feketetcool/32/7595_2.png) [@feketetcool](https://forum.snap.berkeley.edu/u/feketetcool)\
**Post date:** [January 26, 2021, 9:09am UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/9 "2021-01-26T09:09:21Z")

</div>

I like it!

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.snap.berkeley.edu/original/2X/d/dc8cfa4b1c99bd810b188b58c718084d8f47e271.svg) [@system](https://forum.snap.berkeley.edu/u/system)\
**Post date:** [February 25, 2021, 9:09am UTC](https://forum.snap.berkeley.edu/t/clock-project/5109/10 "2021-02-25T09:09:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
