Discuss Scratch

-Valtren-
Scratcher
1000+ posts

How to get smooth camera movement?

I'm trying to recreate the camera effect in splatoon:

But so far it isn't quite smooth(the effect is a bit subtle, but the second gif doesn't have that smoothness effect):

How do I get that smoothness like how the camera moved in splatoon?
Here's the code I'm using for reference(pardon my extension usage):
snezitko
Scratcher
100+ posts

How to get smooth camera movement?

if you want smoothnes I think this will help:
when green flag clicked
forever
change [cam x v] by (((((mouse x) * (-1)) + ((player x) * (-1))) - (cam x)) * (0.3))
same for the cam y
end

smaller the number on left is the smoother it is

Hope it helps

Last edited by snezitko (May 11, 2023 18:18:24)

-Valtren-
Scratcher
1000+ posts

How to get smooth camera movement?

snezitko wrote:

if you want smoothnes I think this will help:
when green flag clicked
forever
change [cam x v] by (((((mouse x) * (-1)) + ((player x) * (-1))) - (cam x)) * (0.3))
same for the cam y
end

smaller the number on left is the smoother it is

Hope it helps

It did! Thanks.

Powered by DjangoBB