generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Camera Zoom in on model?

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
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
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
28 Oct 2012 03:38 PM
HellooooooOOO!?! Derby guy in trouble here.
Report Abuse
goglet is not online. goglet
Joined: 01 Jun 2009
Total Posts: 2331
28 Oct 2012 03:43 PM
Why don't you run output?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
28 Oct 2012 03:49 PM
That wont solve anything, I need a better method.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
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
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
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 is not online. 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
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
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
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
28 Oct 2012 05:09 PM
I'll try that out later LUV, if it works, i'll LUV you.
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
28 Oct 2012 06:15 PM
lol, and it doesn't focus because it's not Vector3.new(), it's CFrame.new()
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image