hey, quick question but
id: 749361
category: Questions about Scratch
posts: 6
Anic120
loading
I've seen other games do it but how do you make a backdrop follow your mouse in a smooth way? like if you put your cursor in the corner, your backdrop will slightly follow?
IceCreamTub
loading
Should probably be in HELP WITH SCRIPTS, but whatever
The BACKDROP In Question is actually SPRITE btw
The BACKDROP In Question is actually SPRITE btw
when green flag clicked
set rotation style [Don't rotate v]
forever
go to x: (0) y: (0)
point towards [Mouse Pointer v]
move ((distance to [Mouse Pointer v])/[10]) steps // you can set it to be a higher number if you want it to be more subtle
end
kiwilover2736
loading
If the OP meant how to make the backdrop just gently move towards the mouse, then this code could be used: Should probably be in HELP WITH SCRIPTS, but whatever
The BACKDROP In Question is actually SPRITE btwwhen green flag clicked
set rotation style [Don't rotate v]
forever
go to x: (0) y: (0)
point towards [Mouse Pointer v]
move ((distance to [Mouse Pointer v])/[10]) steps // you can set it to be a higher number if you want it to be more subtle
end
(Yet again, the background has to be a sprite for this to be work.)
when green flag clicked
forever
go to x: ((mouse x) / (10)) y: ((mouse y) / (10)) //You can change the 10s to whatever number you'd like.
end
Anic120
loading
Here is a project that I've seen do it since the code does not work.
I can't really figure out how the project poster actually did it - but here.
https://scratch.mit.edu/projects/939317139
C&P if the link is not working.
I can't really figure out how the project poster actually did it - but here.
https://scratch.mit.edu/projects/939317139
C&P if the link is not working.
--Irrelevant
loading
Like a parallax?
Anic120
loading
I think so