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: Permanent Camera Tilt

Previous Thread :: Next Thread 
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
13 Feb 2017 08:09 PM
How do I set my camera at an angel so that there is no moving up or down?
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
13 Feb 2017 08:17 PM
local script:::::

local cam = workspace.CurrentCamera
game:GetService( "RunService" ):BindToRenderStep( "Cam", 0, function()
local x, y, z = cam.CFrame:toEulerAnglesXYZ()
local pos = cam.CFrame - cam.CFrame.p
cam.CFrame = pos * CFrame.Angles( x, y, z ) --change the x or y or z to 0 to get rid of that rotation
end)
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
13 Feb 2017 08:18 PM
oops i mean

cam.CFrame * ( cam.CFrame - cam.CFrame.p ):inverse()

or CFrame.new( cam.CFrame.p )
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
13 Feb 2017 08:19 PM
you could also try

local pos = cam.CFrame.p

......... CFrame.Angles( x, y, z ) + pos
Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
13 Feb 2017 09:05 PM
Thank you so much!
You have no idea how much you've helped me today!


omg i am so happy rn
Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
13 Feb 2017 09:07 PM
You've solved one of my problems. I removed the tilt, but how would I get it to hover at 45 degrees?
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
13 Feb 2017 09:09 PM
(pos * Vector3.new(1, 0, 1) + yourVectorHere) --gets rid of y influence
Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
13 Feb 2017 09:42 PM
Is it possible for you to entertain my nooby questions through the chat?
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
13 Feb 2017 10:50 PM
This is bad, You can't just give them the script and help them out, that's not even helping. You're making them lazy! They need to understand what's going on instead of just copy pasting scripts -_-
Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
13 Feb 2017 11:39 PM
Then may you help me out? Perhaps we can chat abit?
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
13 Feb 2017 11:45 PM
@Uday, read this discussion
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=207086010


Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
14 Feb 2017 12:56 AM
Hi soybeen, do you know much about the method, TiltUnits()? If I can get it working, then it would be absolutely perfect, thought it is only locking at 90 degrees when using # while wait() do loop.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
14 Feb 2017 01:05 AM
local cam = workspace.CurrentCamera

while true do
for i = 1,36 do
cam:TiltUnits(i) -- 10 degree increments
wait()
end
end

To permanently tilt, you may need to adjust on RenderStepped, but maybe not.
workspace.CurrentCamera:TiltUnits(9) -- 90 degrees


Report Abuse
tomburk4 is not online. tomburk4
Joined: 13 May 2010
Total Posts: 50
14 Feb 2017 06:30 AM
would then

cam.TiltUnits(4)

be 40 degrees? It's still giving me a tilt of 90 degrees. It's the same with i = 1,36 or any other integer inserted.
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