How would I make a dynamic top down view camera?

Hey, thanks for sharing the script @Czlopek and @ThanksRoBama!

I might be misunderstanding, but is the script supposed to be a purely top-down camera with some extras. Or was it also supposed to rotate the character?

Because I am currently only getting these results:

https://gyazo.com/fd719b699b4921e913d68eb7bfd50747
The player doesn’t rotate corresponding to where the mouse is on the screen, is that deliberate or am I doing something wrong?

Thanks for any help!

I was expecting it to work more like this:

(Expand the quote above to see the video without clicking that shady automatically made link :sweat_smile: )

Edit:
I am getting the same results when using this script:

1 Like

That’s because the rotating is a different script completely, pretty sure i was using bodygyro and some foot plating script.
The script you quoted only affects the camera and it works in three dimensions.

2 Likes

Please make same script with player look at camera i too lazy to do it :wink:
And does it replicate to another player??

1 Like

I’m confident that this isn’t even my code, it was a long time ago before I knew how to do this stuff, and to be honest, it’s really simple.

local Mouse = game.Players.LocalPlayer:GetMouse()
local RunService = game:GetService("RunService")

local Player = game:GetService("Players")

local LPlayer = Player.LocalPlayer
local character = LPlayer.Character

character.Humanoid.AutoRotate = false

local Humanoid = character:WaitForChild("Humanoid")
local HumanoidRoot = character:WaitForChild("HumanoidRootPart")
local Torso = character:WaitForChild("UpperTorso")

local Gyro = Instance.new("BodyGyro")
 Gyro.Parent = Torso
 Gyro.Name = "MouseFollower"
 Gyro.D = 50
 Gyro.P = 4000
 Gyro.MaxTorque = Vector3.new(0,4000,0)

RunService.Heartbeat:Connect(function()

	local hit = Mouse.Hit
	local relHit = hit.p - HumanoidRoot.Position
	local add = 0

	if relHit.X > 0 then
		add = math.rad(90)
	else
		add = math.rad(270)
	end
	local rotY = math.atan(relHit.Z/relHit.X) + add 
	Gyro.CFrame = CFrame.new(0,0,0) * CFrame.Angles(0,-rotY,0) 
	
end)

Beware that it is gonna physically rotate the character so you have to prevent it from launching upwards while next to any object it can collide with, my solution was an invisible slippery cylinder inside the playable character, and yes other players can see it.

If you find any further problems you gonna have to resolve them yourself.

4 Likes