Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Rotation and Movement
- Dwellarz
-
Scratcher
29 posts
Rotation and Movement
Hello there! I am looking for a way to make a clone rotate while moving in one set direction, but I also need that set direction to be a variable. Is there any way I can do this without making a second sprite?
- Emeraldore12
-
Scratcher
100+ posts
Rotation and Movement
The change X/Y blocks move the sprites without moving in the direction of the sprite. Then use the direct reporter.
forever
change x by (your number::grey)//set to negative number to move left/down if Y
set [Dir v] to (direction)
- s714655
-
Scratcher
100+ posts
Rotation and Movement
Make a variable for this sprite only and set it to the value you want, then use sine and cosine appropriately while changing the clones direction normally:
change x by (([sin v] of (dir)::operators) * (speed))replace speed with a number
change y by (([cos v] of (dir)::operators) * (speed))
- Discussion Forums
- » Help with Scripts
-
» Rotation and Movement