Discuss Scratch

RetroGamz
Scratcher
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

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
Scratcher
60 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.
RetroGamz
Scratcher
87 posts

Smooth Tilt to Mouse-Pointer Help

dsdlyjnnn wrote:

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!

Powered by DjangoBB