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: Why doesn't this simple camera script work?

Previous Thread :: Next Thread 
HatHelper is not online. HatHelper
Top 25 Poster
Joined: 02 Mar 2009
Total Posts: 46305
13 Mar 2012 04:15 PM
camera = workspace.Camera
camera.CoordinateFrame = CFrame.new(10,10,10)*CFrame.Angles(math.rad(400),0,0)


(This is in edit mode, it will change the camera position, but not the rotation)
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
13 Mar 2012 04:30 PM
Cameras don't like to rotate by CoordinateFrame manipulation like that.

CoordinateFrame = Position of camera
Focus = What the camera looks at


camera.CoordinateFrame = CFrame.new(10,10,10)
camera.Focus = CFrame.new(0,0,0)

That will make the camera positioned at (10, 10, 10) and look at (0, 0, 0)
Report Abuse
HatHelper is not online. HatHelper
Top 25 Poster
Joined: 02 Mar 2009
Total Posts: 46305
13 Mar 2012 04:35 PM
gah
I'm gonna have to use math.cos/math.sin stuff to make it actually rotate right?
Should have payed attention in geometry...
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
13 Mar 2012 04:36 PM
Yup :P

I was never taught in geometry how to use trig for circles, but somehow managed to learn it on here. It's easier than it first looks though
Report Abuse
HatHelper is not online. HatHelper
Top 25 Poster
Joined: 02 Mar 2009
Total Posts: 46305
13 Mar 2012 04:37 PM
I was out of geometry. Day dreaming about scripts, I don't know how I managed to pass. I recall not doing homework, not passing tests, or quizzes, getting a 93 on the exam and passing somehow.


camera = workspace.Camera

for i=1, 100 do
wait()
camera.CoordinateFrame = CFrame.new(10,i,10)
camera.Focus = CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(i))
end



Can you make it so the camera rotates by 90 intervals(on the x axis), while still looking at workspace.Part?

:33
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
13 Mar 2012 04:42 PM
The is crazy mans expertise. I actually only played one game.
Report Abuse
H75 is not online. H75
Joined: 28 May 2011
Total Posts: 4819
13 Mar 2012 05:36 PM
Learning scripting will be my new hobby after I graduate...
Report Abuse
H75 is not online. H75
Joined: 28 May 2011
Total Posts: 4819
13 Mar 2012 05:39 PM
Hat, crazy, You guys sould make like an epic computer game yourselves. You know. Study the robox engin?
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