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 » Scripters
Home Search
 

Re: Translating the camera forward

Previous Thread :: Next Thread 
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Mar 2015 06:37 PM
I'm working on a gun, and since the gun is out in front of the guy I want to move the camera forward 1-2. I don't think the camera has a property, but is Field Of View the way to do this?
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Mar 2015 06:57 PM
Kind of a similar thing to CameraSubject.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Mar 2015 06:58 PM
camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0, 0, -2)
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Mar 2015 07:18 PM
@cnt

That doesn't move it forward. It just turns the camera the opposite direction.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
11 Mar 2015 07:54 PM
Use a Scriptable camera type.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Mar 2015 08:07 PM
If I set it to scriptable and do just that line it'll lock the camera in a spot.

Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
11 Mar 2015 08:55 PM
n a local script in Players StarterPack put this:

local camera = workspace.CurrentCamera
local subject = camera.CameraSubject -- save
local type = camera.CameraType --save

local core = Instance.new("Part", Workspace)-- CHANGE THIS TO THE TIP OF pLAYERS gUN
--core.CFrame = CFrame.new(Vector3.new(0,0,0))
--core.Anchored = true
camera.CameraSubject = core --game.Workspace.Core
camera.CameraType = "Watch" -- yOU MAY NOT HAVE TO CHANGE tYPE
camera.FieldOfView = 55
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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