Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How Do I Make Somthing Rotate towards a sprite
- Usiah
-
12 posts
How Do I Make Somthing Rotate towards a sprite
I've Been Trying To Do This For A Month Can You Help?
- Usiah
-
12 posts
How Do I Make Somthing Rotate towards a sprite
no rotate slowly like rotate 5 dagrees towards sprite
- Usiah
-
12 posts
How Do I Make Somthing Rotate towards a sprite
btw im not dumb im a scratcher and ive been makeing games on scratch for 4 years
- RokCoder
-
1000+ posts
How Do I Make Somthing Rotate towards a sprite
Make sure the custom block is set to non-refresh and use the following -
The block should be called from the sprite that needs to turn. target sprite is the sprite that it needs to turn towards. current direction, target direction and delta direction are all local (this sprite only) variables. rotation speed is the speed at which you want it to turn.
The block should be called from the sprite that needs to turn. target sprite is the sprite that it needs to turn towards. current direction, target direction and delta direction are all local (this sprite only) variables. rotation speed is the speed at which you want it to turn.
- TimeLordPlanet
-
500+ posts
How Do I Make Somthing Rotate towards a sprite
Make sure the custom block is set to non-refresh and use the following -That's a nice script, but I don't think that the
The block should be called from the sprite that needs to turn. target sprite is the sprite that it needs to turn towards. current direction, target direction and delta direction are all local (this sprite only) variables. rotation speed is the speed at which you want it to turn.
variable is necessary because it just renames a pre-prepared variable in the game
EDIT: Forget everything I said. I speedread sometimes, and evidently I did so when posting here
Last edited by TimeLordPlanet (July 16, 2018 13:46:44)
- Usiah
-
12 posts
How Do I Make Somthing Rotate towards a sprite
Thanks!
its wierd when i get in a _=Rotaion Speed Radius of its direction. it points at me cool but not what im looking for








its wierd when i get in a _=Rotaion Speed Radius of its direction. it points at me cool but not what im looking for









Last edited by Usiah (July 16, 2018 20:20:08)
- RokCoder
-
1000+ posts
How Do I Make Somthing Rotate towards a sprite
Thanks!
its wierd when i get in a _=Rotaion Speed Radius of its direction. it points at me cool but not what im looking for
Are you saying it doesn't rotate towards facing the target? If so, can you share your project as I can't see any reason why it wouldn't work.
- RokCoder
-
1000+ posts
How Do I Make Somthing Rotate towards a sprite
You need to look closely at the groupings of the operators in this line -
You've grouped them differently in your project which is why it isn't working properly.
For clarity (because it's not really clear to look at) -
point in direction ( current direction + ( ( delta direction / abs of delta direction ) * rotation speed ) )
You've grouped them differently in your project which is why it isn't working properly.
For clarity (because it's not really clear to look at) -
point in direction ( current direction + ( ( delta direction / abs of delta direction ) * rotation speed ) )
Last edited by RokCoder (July 17, 2018 06:16:11)
- Usiah
-
12 posts
How Do I Make Somthing Rotate towards a sprite
Worked! i thought that was the case but coundnt see what order
- ShinigamiBlacky
-
100+ posts
How Do I Make Somthing Rotate towards a sprite
Dont blockspam / Bump a forum if the poroblem is solved
- alittletotheright
-
11 posts
How Do I Make Somthing Rotate towards a sprite
Instead of directly pointing in the direction, is there a way to output which way it needs to turn?
Nvm I got it. Thanks for the scripts.
Nvm I got it. Thanks for the scripts.
Last edited by alittletotheright (Dec. 1, 2021 15:05:52)
- bigbrainfishperson
-
3 posts
How Do I Make Somthing Rotate towards a sprite
so I followed this code and while it does work it doesn't rotate as slow as I want it to. I probably did something wrong though so here's my project if someone wants to look through it and help me. https://scratch.mit.edu/projects/632454583/ . the thing that is supposed to turn is the grey tanks turret.
Last edited by bigbrainfishperson (Jan. 23, 2022 06:32:30)
- Jbear_
-
1000+ posts
How Do I Make Somthing Rotate towards a sprite
https://scratch.mit.edu/projects/632454583/ . the thing that is supposed to turn is the grey tanks turret.Please don’t necropost, make your own topic so I followed this code and while it does work it doesn't rotate as slow as I want it to. I probably did something wrong though so here's my project if someone wants to look through it and help me.
- JulleBulle100
-
2 posts
How Do I Make Somthing Rotate towards a sprite
I think you need to set the rotation speed to something first Thanks!
its wierd when i get in a _=Rotaion Speed Radius of its direction. it points at me cool but not what im looking for
- supa-panda
-
100+ posts
How Do I Make Somthing Rotate towards a sprite
Please don’t necropost, make your own topic
- the98phases
-
8 posts
How Do I Make Somthing Rotate towards a sprite
doesnt work for scratch 3.0 @RokCoder
- Discussion Forums
- » Help with Scripts
-
» How Do I Make Somthing Rotate towards a sprite