Discuss Scratch

RaccooDev
Scratcher
17 posts

HOW DO I MAKE A MOVING CAM??????

HOW DO I MAKE A CAMERA AND MAKE IT SCROLL? I WANT TO ADD A DELAY OF LIKE 0.5 SECONDS FOR A FANCY EFFECT WHERE THE HAS TO CATCH UP WITH THE PLAYER SLIGHTLY!!! URGENT!!!
Lpea42
Scratcher
100+ posts

HOW DO I MAKE A MOVING CAM??????

Please don't type in all caps. It is considered spamming.
RaccooDev
Scratcher
17 posts

HOW DO I MAKE A MOVING CAM??????

Lpea42 wrote:

Please don't type in all caps. It is considered spamming.
sorry also I dont think the code loaded

Last edited by RaccooDev (Oct. 16, 2025 01:02:56)

N8_D_GR8_1
Scratcher
1000+ posts

HOW DO I MAKE A MOVING CAM??????

I made this example project:

https://scratch.mit.edu/projects/1161063973/

If you have any questions, just let me know
awesome-llama
Scratcher
1000+ posts

HOW DO I MAKE A MOVING CAM??????

Assuming it's 2D, create 2 variables for the camera's position

(camera x)
(camera y)

To display objects on screen relative to the camera you can subtract the camera's position from the object's position:

go to x: ((object x) - (camera x)) y: ((object y) - (camera y))

You can make the camera move however you want by setting the camera position variables. For example, if you wanted it to follow the player, you could copy the player's position:

set [camera x v] to (player x)
set [camera y v] to (player y)

A camera that slowly moves to the player could be done in many ways. Here's a simple one:

change [camera x v] by (((player x) - (camera x)) * (0.1))
change [camera y v] by (((player y) - (camera y)) * (0.1))
RaccooDev
Scratcher
17 posts

HOW DO I MAKE A MOVING CAM??????

awesome-llama wrote:

Assuming it's 2D, create 2 variables for the camera's position

(camera x)
(camera y)

To display objects on screen relative to the camera you can subtract the camera's position from the object's position:

go to x: ((object x) - (camera x)) y: ((object y) - (camera y))

You can make the camera move however you want by setting the camera position variables. For example, if you wanted it to follow the player, you could copy the player's position:

set [camera x v] to (player x)
set [camera y v] to (player y)

A camera that slowly moves to the player could be done in many ways. Here's a simple one:

change [camera x v] by (((player x) - (camera x)) * (0.1))
change [camera y v] by (((player y) - (camera y)) * (0.1))

Thanks but 1000+ POSTS??? May I respectfully tell you to attempt to get a livelihood?
Jlerpy
Scratcher
1000+ posts

HOW DO I MAKE A MOVING CAM??????

RaccooDev wrote:

awesome-llama wrote:

Assuming it's 2D, create 2 variables for the camera's position

(camera x)
(camera y)

To display objects on screen relative to the camera you can subtract the camera's position from the object's position:

go to x: ((object x) - (camera x)) y: ((object y) - (camera y))

You can make the camera move however you want by setting the camera position variables. For example, if you wanted it to follow the player, you could copy the player's position:

set [camera x v] to (player x)
set [camera y v] to (player y)

A camera that slowly moves to the player could be done in many ways. Here's a simple one:

change [camera x v] by (((player x) - (camera x)) * (0.1))
change [camera y v] by (((player y) - (camera y)) * (0.1))

Thanks but 1000+ POSTS??? May I respectfully tell you to attempt to get a livelihood?

No, that's just being rude. They're here trying to help you.
RaccooDev
Scratcher
17 posts

HOW DO I MAKE A MOVING CAM??????

Jlerpy wrote:

RaccooDev wrote:

awesome-llama wrote:

Assuming it's 2D, create 2 variables for the camera's position

(camera x)
(camera y)

To display objects on screen relative to the camera you can subtract the camera's position from the object's position:

go to x: ((object x) - (camera x)) y: ((object y) - (camera y))

You can make the camera move however you want by setting the camera position variables. For example, if you wanted it to follow the player, you could copy the player's position:

set [camera x v] to (player x)
set [camera y v] to (player y)

A camera that slowly moves to the player could be done in many ways. Here's a simple one:

change [camera x v] by (((player x) - (camera x)) * (0.1))
change [camera y v] by (((player y) - (camera y)) * (0.1))

Thanks but 1000+ POSTS??? May I respectfully tell you to attempt to get a livelihood?

No, that's just being rude. They're here trying to help you.

twas a joke traveler

Powered by DjangoBB