Topic: Set object position to mouse x and y position
so heres my simple code:
Camera =getObject("Camera0")
player = getObject("Entity0")
function onSceneUpdate()
colorr=math.random(0, 2)
colorg=math.random(0, 2)
colorb=math.random(0, 2)
getX = getAxis("MOUSE_X")
getY = getAxis("MOUSE_Y")
var1 = updateMatrix(getX)
print (var1)
Camera = getCurrentCamera()
setCameraClearColor(Camera, {colorr, colorg, colorb})
end
i'm trying to set the position of player to mouse position but when i use "getAxis("MOUSE_X") it throws out a strange float, what can i do with this data?
Last edited by blend (2017-01-02 01:04:02)