Topic: Mouse Look question
Hello I have used this script (look below) for mouse look on my game(test), however i am faced with a problem where i can only move side ways so far, and I cannot do a 360 view. can i get some help here?
by the way I took this example from the Video tutorials from special_ops (great tutorials by the way)
<code>
-- Global Variables
dx = 0.0
dy = 0.0
centerCursor()
my = getAxis("MOUSE_Y")
mx = getAxis("MOUSE_X")
-- stuff
hideCursor()
function MoveAround()
-- look around
-- X Axis
rotate(Player, {0, 0, -1}, dx*100)
-- Y Axis
rotate(Head, {1, 0, 0}, dy*100, "local")
rotation = getRotation(Head)
if rotation[1]>90 then
rotation[1] = 90
elseif rotation[1] < -90 then
rotation[1] = -90
end
-- get new mouse position
dx = getAxis("MOUSE_X") - mx
dy = getAxis("MOUSE_Y") - my
-- center cursor
--centerCursor()
mx = getAxis("MOUSE_X")
my = getAxis("MOUSE_Y")
</code>