|
| 28 Oct 2012 03:19 PM |
Here's my problem, a player spawns a car in my derby and the camera doesn't focus in on the car, here's what I have in place to fix it, but it doesn't always work:
game.Workspace.CurrentCamera.CameraType = "Track" game.Workspace.CurrentCamera.CoordinateFrame = game.Workspace.CurrentCamera.CoordinateFrame +Vector3.new(-20,20,0)
Does anyone have a better idea? |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 03:38 PM |
| HellooooooOOO!?! Derby guy in trouble here. |
|
|
| Report Abuse |
|
|
goglet
|
  |
| Joined: 01 Jun 2009 |
| Total Posts: 2331 |
|
| |
|
|
| 28 Oct 2012 03:49 PM |
| That wont solve anything, I need a better method. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 04:18 PM |
| Derbyer in distress here, can anyone help me find a better way to zoom in on a model? |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 04:50 PM |
Put this in a Local Script, and put the Local Script in Starterpack or PlayerGui:
local player = game.Players.LocalPlayer local character = player.Character local humanoid = character.Humanoid
while true do wait(0.1) if humanoid.Sit == true then game.Workspace.CurrentCamera.CameraType = "Track" player.CameraMode = Enum.CameraMode.LockFirstPerson --This is optional else game.Workspace.CurrentCamera.CameraType = "Custom" player.CameraMode = Enum.CameraMode.Classic --This is optional end end |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 28 Oct 2012 04:54 PM |
You have to grab everybody's camera.
I think. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 04:55 PM |
This is a better method though:
local player = game.Players.LocalPlayer local character = player.Character local humanoid = character.Humanoid
function CheckIfInSeat() if humanoid.Sit == true then game.Workspace.CurrentCamera.CameraType = "Track" player.CameraMode = Enum.CameraMode.LockFirstPerson --This is optional else game.Workspace.CurrentCamera.CameraType = "Custom" player.CameraMode = Enum.CameraMode.Classic --This is optional end end
humanoid.Changed:connect(CheckIfInSeat) |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 05:09 PM |
| I'll try that out later LUV, if it works, i'll LUV you. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 06:15 PM |
| lol, and it doesn't focus because it's not Vector3.new(), it's CFrame.new() |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2012 08:37 AM |
Your solution did not work, but you gave me the great idea of zooming in on the character's head using CFrame rather than vector, then panning it out with Vector3.
Thank you! |
|
|
| Report Abuse |
|
|