Camera Manipulation help

I want to make it that you don’t spawn in you just have this camera floating above a map with cities and stuff on it. Kind of like Rise of nations. When you hold right click and move your cursor the camera moves to the opposite direction of the direction you are moving your cursor. Kind of like a drag feature idk. Thing is how do I make something like this.

2 Likes

You can prevent the player from spawning in automatically by using this function:
Players.CharacterAutoLoads (roblox.com)

Since you want to make a game that is top-down in this way, you’ll need to manipulate the camera, script the camera, and add controls to the camera without using the player. You should also see this article on camera manipulation:
Camera Manipulation (roblox.com)

What you’re referring to with a right-click drag is called “panning”. This can most likely be implemented into your camera script. I’m not going to write the script for you, because it would help you more to design it yourself for your own purpose, but what you generally will need to do is attach controls to the camera, and lock the camera along a 2-dimensional axis that allows the right-click button in combination with mouse movement to pan the camera around the screen.

2 Likes

Thanks for the help. One more question where did you learn to code??

1 Like

I would say that 99% of my coding ability comes from practice, and working on projects. The best way to learn anything is through practice.

2 Likes

How long did it take you to learn the “Core” of roblox lua.

1 Like

I still don’t know the core of it, I’ve only really been doing this for a few weeks. There’s a lot of knowledge I still haven’t picked up on.

1 Like

Sorry for bothering you one last time, but how long do you usually put into scripting each day?

1 Like

I work on it whenever i have time, sometimes I do it for 10 hours straight, other times I don’t do it at all.

1 Like

So, do I just set the value to false?