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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 13 Feb 2017 08:19 PM |
you could also try
local pos = cam.CFrame.p
......... CFrame.Angles( x, y, z ) + pos |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 13 Feb 2017 09:09 PM |
| (pos * Vector3.new(1, 0, 1) + yourVectorHere) --gets rid of y influence |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|