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: lookVector of camera

Previous Thread :: Next Thread 
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
06 Jul 2016 02:52 PM
how do you get the lookVector of a camera ?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 Jul 2016 02:52 PM
local LV = workspace.CurrentCamera.CFrame.lookVector


Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
06 Jul 2016 02:53 PM
camera.CFrame.lookVector

Formerly ToxicDominator - add 17,509 posts | :(){:|:&};:
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
06 Jul 2016 02:53 PM
God dammit Jarod

Formerly ToxicDominator - add 17,509 posts | :(){:|:&};:
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 Jul 2016 02:54 PM
I have a plugin that automatically brings up a new Chrome tab each time someone posts something here.

I'm joking, but that would be really messy.


Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
06 Jul 2016 02:56 PM
@Jarod
If you did that, all I can do is pray for your computer. It would roast itself to death eventually.


-=[ RAP: 345,710 || DurstAuric; the narb of ROBLOX ]=-
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
06 Jul 2016 03:01 PM
wait()
cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
cam.FieldOfView = 50
cam.CameraSubject = workspace.Part1
cam.CFrame = CFrame.new(workspace.Part1.CFrame.lookVector)

i did this but the lookVector is going crazy :(
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
06 Jul 2016 03:05 PM
: ( :( :( :( :(
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
06 Jul 2016 03:09 PM
What are you trying to do?
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
06 Jul 2016 03:16 PM
So I have the position of the camera where I want it, but it's not facing the right direction.
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
06 Jul 2016 03:19 PM
Okay, well if you have an object that you want the camera to look at, (for example workspace.Part1) then you can do this:

cam.CFrame = CFrame.new(cam.CFrame.p, workspace.Part1.CFrame.p)

That will keep the camera in the same position, but this time it will look at workspace.Part1.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
06 Jul 2016 03:22 PM
if I want to be more specific how can i add in (x,y,z) ?
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
06 Jul 2016 03:29 PM
I think you mean like this:

cam.CFrame = CFrame.new(Vector3.new(x, y, z), workspace.Part1.CFrame.p)

So you can specify a position for the camera?
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
06 Jul 2016 03:37 PM
cam.CFrame = CFrame.new(cam.CFrame.p, cam.CFrame.p+workspace.Part1.CFrame.lookVector)
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