Blender 3D gamekit Android opengl touch look testing on nexus 7
using Lua Script to build game logic
below is the lua script used in video:
Sensitivity = 0.005
Invert = 1
Threshold=6
--OgreKit.DebugPrint(Sensitivity)
mouse=OgreKit.Mouse()
scene = OgreKit.getActiveScene()
play = scene:getObject("Player")
sensor=scene:getObject("senMouseLook")
mouse:capture()
--dPrintf("---xrel: " .. mouse.xrel)
--dPrintf("---yrel: " .. mouse.yrel)
if mouse.xrel+mouse.yrel>Threshold or mouse.xrel+mouse.yrel<-Threshold then
play:roll( -(mouse.xrel ) * Sensitivity * Invert,OgreKit.TS_LOCAL)
play:pitch( -(mouse.yrel) * Sensitivity * Invert,OgreKit.TS_LOCAL)
end