pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
|
| 01 Nov 2016 08:33 PM |
example
i.imgur . com /jp2rOZB . gifv
i made this as an example, the code is a joke. what would be the best way about doing this? im bad at explaining things, so heres a picture if im not asking for too much here
i.imgur . com /QiLSJbF . png
if someone can give me what i need to do this or an explanation, even a link to example code to do something like this it would be very helpful thx |
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
| |
|
|
| 01 Nov 2016 11:13 PM |
Assign a var like rotation to 0, then whenever the mouse moves update that rotation var accordingly. So like:
local rotation function deltaMouseMove(deltaX, deltaY) local rotationInc = math.pi/64--change this for sensitivity rotation = rotation + rotationInc end
--//then in renderstepped game:GetService("RunService").RenderStepped:connect(function() cam.CoordinateFrame = CFrame.new(pos) * CFrame.new(0, rotation, 0) end) |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 11:14 PM |
Oops change this line:
rotation = rotation + rotationInc * deltaX |
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 01 Nov 2016 11:17 PM |
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local cam = workspace.CurrentCamera
mouse.Move:connect(function() cam.CameraType = "Scriptable" cam:Interpolate(CFrame.new(workspace.Part.Position),CFrame.new(mouse.hit.p.x,workspace.Part.Position,workspace.Part.Position) end)
idk something like that don't judge me for my mess
|
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
|
| 01 Nov 2016 11:24 PM |
eh, i did this last time
function() Camera.CoordinateFrame = CFrame.new(LoadingZoneCameraTarget.Position) * CFrame.Angles(0, 90 - (Mouse.X / 360), 0) end
and was the result i had the gif, except the one in the gif was devided a lot more |
|
|
| Report Abuse |
|
|
Briicks
|
  |
| Joined: 03 Apr 2015 |
| Total Posts: 1796 |
|
|
| 02 Nov 2016 10:37 AM |
Bump, I'm curious too.
Instant Profit Finder: https://www.roblox.com/games/486614503/SFPF |
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
| |
|
|
| 02 Nov 2016 02:31 PM |
| I made a similar script to this, give me like 5 minutes to find it. |
|
|
| Report Abuse |
|
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
| |
|
pidgey
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 2739 |
|
| |
|