Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Smooth Tilt to Mouse-Pointer Help
- RetroGamz
-
87 posts
Smooth Tilt to Mouse-Pointer Help
Im making a game where you find sea shells using a brush. the brush uses this code to go to the mouse pointer smoothly
I want the brush to smoothly tilt towards the mouse pointer at like a 45 degree angel while the mouse moves. Is there anyone who could help me? Credit will be given
Thank you!
- Retro
go to x: ((x position) + (((mouse x) - (x position)) / (5))) y: ((y position) + (((mouse y) - (y position)) / (5)))
I want the brush to smoothly tilt towards the mouse pointer at like a 45 degree angel while the mouse moves. Is there anyone who could help me? Credit will be given
Thank you!
- Retro
- dsdlyjnnn
-
60 posts
Smooth Tilt to Mouse-Pointer Help
This script does the same thing, but with the added functionality of also smoothly tilting.
Also, make sure the handle is pointing towards the left.
point towards (mouse-pointer v)
move ((distance to (mouse-pointer v)) / (5)) steps
Also, make sure the handle is pointing towards the left.
- RetroGamz
-
87 posts
Smooth Tilt to Mouse-Pointer Help
This script does the same thing, but with the added functionality of also smoothly tilting.point towards (mouse-pointer v)
move ((distance to (mouse-pointer v)) / (5)) steps
Also, make sure the handle is pointing towards the left.
Thank you! Ill give credit!
- Discussion Forums
- » Help with Scripts
-
» Smooth Tilt to Mouse-Pointer Help