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: Camera rotate around an object at an angle

Previous Thread :: Next Thread 
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
20 Mar 2016 09:31 PM
im trying to create a script that makes the camera rotate around an object top down at an angle. unfortunately im not that good at trig so the camera isnt working properly. here is the script;

local target = workspace.Level.PlayingField
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
camera.CoordinateFrame = CFrame.new(0, 100, 0) * CFrame.Angles(math.rad(-70), 0, 0)
local angle = 0


while wait() do
camera.CoordinateFrame = camera.CoordinateFrame
* CFrame.fromEulerAnglesXYZ(0, math.rad(1/6), 0)
end

the camera instead rotates in place upwards. any help would be appreciated
Report Abuse
Laakari is not online. Laakari
Joined: 07 Aug 2014
Total Posts: 17362
20 Mar 2016 09:42 PM
I would help you but I just started my trig class like 6 weeks ago xD

I've held off for a few years on learning angles until recently, I'm curious to find the answer to your problem as well.


Report Abuse
c9_io is not online. c9_io
Joined: 15 Feb 2014
Total Posts: 2642
20 Mar 2016 10:11 PM
On mobile so can't help anyway but don't use coordinate frame but use camera.CFrame
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
20 Mar 2016 10:19 PM
still doesnt work
Report Abuse
Cizox is not online. Cizox
Joined: 25 Dec 2009
Total Posts: 42220
21 Mar 2016 12:47 PM
bump
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