Hey GoodOne.
Try adding this to the player controller function.
If camrotation.x > 90.0 Then camrotation.x = 90.0
If camrotation.x < -20.0 Then camrotation.x = -20.0
So your PlayerController should look like this:
Function PlayerController()
mx = Curve(MouseX() - GraphicsWidth() / 2, mx, 6)
my = Curve(MouseY() - GraphicsHeight() / 2, my, 6)
MoveMouse(GraphicsWidth() / 2, GraphicsHeight() / 2)
camrotation.X = camrotation.X + my / 10.0
camrotation.Y = camrotation.Y - mx / 10.0
RotateEntity(fw.Main.camera, camrotation)
If camrotation.x > 90.0 Then camrotation.x = 90.0
If camrotation.x < -20.0 Then camrotation.x = -20.0
move = KeyDown(KEY_W) - KeyDown(KEY_S)
strafe = KeyDown(KEY_D) - KeyDown(KEY_A)
jump:Float = 0.0
If KeyHit(KEY_SPACE) & Not ControllerAirborne(player)
jump = 8.0
End If
If KeyDown(KEY_LSHIFT) | KeyDown(KEY_RSHIFT)
move = move * 3.0
strafe = strafe * 3.0
End If
There might be a better way of doing this , but it works
Thanks
Gimpy73