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 manipulation

Previous Thread :: Next Thread 
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:01 PM
camera=game.Workspace.CurrentCamera
camera.CameraType="Scriptable"
place=game.Workspace.Model

camera.CameraSubject=place.Sub
camera.CoordinateFrame=CFrame.new(place.Cam.Position)
camera.Focus=CFrame.new(place.Sub.Position)

It's moving the camera to the part named Cam, but the camera is still focusing on the player.
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
03 Nov 2013 05:02 PM
Put it in a loop. Roblox switches the camera back to the player.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:02 PM
There's no output and everything referenced exists
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:03 PM
How do I change that?
Having it in a loop wouldn't work very well since I need to change this a lot
Report Abuse
qrrrq is not online. qrrrq
Joined: 27 Jan 2013
Total Posts: 1252
03 Nov 2013 05:04 PM
Try constant interpolation.

camera=game.Workspace.CurrentCamera
camera.CameraType="Scriptable"
place=game.Workspace.Model

camera.CameraSubject=place.Sub
while wait() do
camera:Interpolate(CFrame.new(place.Cam.Position), place.Sub.Position,.1)
end
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:08 PM
Unable to cast CFrame to vector3
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Nov 2013 05:09 PM
camera:Interpolate(place.Cam.Position, place.Sub.Position,.1)
Report Abuse
qrrrq is not online. qrrrq
Joined: 27 Jan 2013
Total Posts: 1252
03 Nov 2013 05:10 PM
Oh hehe

camera=game.Workspace.CurrentCamera
camera.CameraType="Scriptable"
place=game.Workspace.Model

camera.CameraSubject=place.Sub
while wait() do
camera:Interpolate(CFrame.new(place.Cam.CFrame), place.Sub.CFrame,.1)
end
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Nov 2013 05:11 PM
oh interpolation NEEDS a CFrame value ignore me :3
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:13 PM
Vector3 expected, got userdata
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
03 Nov 2013 05:17 PM
Oh, that line needed to be

camera:Interpolate(CFrame.new(place.Cam.Position), CFrame.new(place.Sub.Position),.1)

thanks for your help
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