Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

can someone help with camera movement help?

Asked by
Teeter11 281 Moderation Voter
10 years ago

so im doing ios development and im trying to make the camera twist and this is what i have and i dont know how twist it right.

input = game:GetService("UserInputService")
cam = game.Workspace.CurrentCamera.CoordinateFrame

input.TouchRotate:connect(function(  touchPositions, rotation,  velocity,  state )
    --script.Parent.state.Text = state
    game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(cam.x,cam.y,cam.z)*CFrame.Angles(-.5,rotation,0)

end )

this doesnt work right because it twists up to the left and up to the right.

thanks! :D

2 answers

Log in to vote
0
Answered by 10 years ago

Okay so soccer wasn't wrong. Twist is a very vague term, I'm not sure what you mean by it because twist defines all three axis. Do you mean roll? If so, do this for the angle.
cam:setRoll(angle) That is the only way to set the roll of the camera. Just like how an airplane tilts to the left or right; it is rolling in place but does not move.

0
I want the camera to move left and right not turn right and left Teeter11 281 — 10y
0
Ah my bad my mistake. I didn't understand what you were asking. soaprocks2 75 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

If you want the camera to rotate (like I think you want it to), then you need to set the Camera.CameraType property to Enum.CameraType.Scriptable. The problem with this is it is harder to manipulate, but you have more freedom to do stuff like rotate it and whatnot.

0
It is already set to scriptable........ it is not moving in a circle is what i mean like i want it to do Teeter11 281 — 10y

Answer this question