|
| 12 Mar 2014 12:20 PM |
Is it possible to set camera focus or CameraSubject to mouse.X Position?
while wait() do camera.CoordinateFrame = CFrame.new(p.Position) camera.Focus = CFrame.new(game.Players.LocalPlayer:GetMouse().X) end --Says Vector3 Position needed :/ |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 12 Mar 2014 12:23 PM |
no because mouse.X is a float and you need a cframe also you'd want to do game:GetService("RunService").RenderStepped:connect(function() --code end |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Mar 2014 12:44 PM |
I have this, but it when I turn the character by pressing a or s the head is out of focus.
p = Instance.new("Part", game.Players.LocalPlayer.Character) p.Size = Vector3.new(1, 1, 1) p.CanCollide = false p.Transparency = 1 w = Instance.new("Weld", p) w.Part1 = game.Players.LocalPlayer.Character.Head w.C0 = CFrame.new(Vector3.new(-2, -2, -7)) w.Part0 = p
camera = game.Workspace.CurrentCamera camera.CameraType = "Fixed"
game:GetService("RunService").RenderStepped:connect(function() camera.CoordinateFrame = CFrame.new(p.Position) camera.Focus = CFrame.new(game.Players.LocalPlayer.Character.Head.Position) end) |
|
|
| Report Abuse |
|
|
| |
|