Changing a clone's rotation point also changes that of its parent

Self-explanatory, although the bug has been fixed now.


Old content of this post: "I want to be able to rotate my sprite around the point (0, 0), preferably with a custom block. Could someone who knows trigonometry please help?"

What do you mean by

?

meow (1)
Okay, so pretend the filled square is the sprite and the non-filled one is (0, 0).
If I perform a 90-degree counterclockwise rotation at point (0, 0), it will result in this:
meow (3)
(Images are approximated)

This doesn't require trig, it's pretty easy to make.

okay, then how do you do it?

I'm working on it.

set_rotation
like this?

Yes, but it stays consistent for the sprite/costume, and for some reason setting the rotation of a clone also sets the rotation of its parent.

you can first remember the current rotation coordinates, and then set them again afterwards. Clones inherit their costume, so you first would need to shadow it. Actually, that's probably a bug in Snap! Let me take care off it... :slight_smile:

I added the block to my custom block collection: Snap! 7.0.1 - Build Your Own Blocks

Thank you!

Your welcome.

I've fixed the inherited costume glitch for next week's patch. You can try it out here:
https://snap.berkeley.edu/versions/dev
Setting a clone's rotation coordinates should no longer also change it for the parent.
Thanks for the report. Please let me know if it doesn't work for you (make sure to hard-reload the dev version until you see v7.0.2)

When I have bumped into the issue, some time ago, I haven't reported it as I didn't want to bother you, Jens, because you were too busy to give it a priority, but luckily now (with major job of ver 7.0 being done) you were able to fix it right away. Thanks.

I'd like to ask you, helicoptur, to change the topic's category to "Bug report" and it's title to "Setting the rotation of a clone also sets the rotation of its parent", because, using your words,...

... was the main reason you wrote it in the first place, if I am not mistaken.

...Well, I guess that bug was what inspired me... I'll change it.

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