I’ve made the Alonzo (anchor) plus nested arm (part) program as described in page 10 of the manual. Alonzo waves his nested arm alright but there is a problem when he hits the edge
if I let both alonzo and the arm rotate then alonzo turns upside down
If I set both alonzo and the arm to only face left right then the arm doesn't wave
If I set alonzo to only face left right and the arm to rotate then the arm goes to the wrong position when travelling right to left. The shared project is in this mode.
I’ve left the project in flat design because it’s easier to see the rotation options that way.
Totally expected - standard sprite behaviour when edge bouncing
As expected - arm can't wave if it not able to rotate
I'm assuming this is the one that you want to actually look OK?
If so try this out
Basically arm sprite checks the direction of alonzo sprite and alters its own direction and flips it's costume vertically
FYI When someone else opens your projects - it opens up in their editing mode not yours
[edit2 -slightly simpler]
A visually better method is to leave arm sprite script alone and alter the alonzo sprite
This alters the direction and flip state of the arm sprite when alozo sprite turns around and avoids the slight lag the previous method has but is a bit more complex
One thing I'm noticing is that quite often, the arm shifts it anchor point while I'm trying things out and I have to stop everything, detach and re-attach it back in the right place
[edit] I've found that this happens if make Alonzo go in a non-90 direction - the anchor point seems to shift.
If I return the direction to 90, it returns to original position
The classic example of nested (IIRC) is to have a Fairground Wheel with attached buckets and make the wheel go round but keep the buckets horizontal
Very simple to program
Also just make a sprites eyes blink or mouth operate as it moves around
Or car wheels spin as car body moves along. I actually remember getting pupils doing that in Scratch back in the day - much easier with attached sprites in Snap!
Your idea just wasn't suitable for a beginner I'm afraid
Is the arm's rotation center set to the point around which it should rotate? When I get this sort of problem it usually means that the rotation is working just fine, but around the wrong point.
I did the car spinning wheels example suggested by cymplecy.
Initially, when it turned at the wall the wheels shifted position. Then I altered the pivot point of the car to be horizontal (and half way between the wheels) with the pivot point of the wheels, at their centre. This solved the problem.
I also reset the spin direction of the wheels to correlate with the car direction. It also works fine if you change the size of the car. Snap! car_spin_wheels (berkeley.edu)
I think this sentence in the manual, p. 10, is incorrect, "The precise place where you let go of the mouse button will be the attachment point of the part on the anchor."
What worked for me was placing the wheel part in the correct position on the car before dragging that wheel from the sprite corral onto the car.
You can use an offset attach
It is even more complicated in js because u have to implement darn rotation urself which i often get sin for the x axis and wonder about the inverted rotation