[quote]Hey guys,here a script for walking with the arrow keys and gamepad:[code]local mouse_x = 0local mouse_y = 0local charmove_x = 0local charmove_y = 0function keyboardHandler(eventType, character, keycode, modifiers) if eventType==eEvtKeyUp then print('key up: ' .. keycode) keycode = keycode % 1073741824 if keycode == 80 then -- left charmove_x = 0 elseif keycode == 79 then -- right charmove_x = 0 elseif keycode == 81 then -- down charmove_y = 0 elseif keycode == 82 then -- up charmove_y = 0 end createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y},25) elseif eventType==eEvtKeyDown then print('key pressed: ' .. keycode) keycode = keycode % 1073741824 if keycode == 80 then -- left charmove_x = -100 elseif keycode == 79 then -- right charmove_x = 100 elseif keycode == 81 then -- down charmove_y = 100 elseif keycode == 82 then -- up charmove_y = -100 end createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y},25) elseif eventType==eEvtControllerKeyUp then print('controller up: ' .. keycode) if keycode == 1000001 then --controller key A up createEvent('eEvtMouseLeftButtonDown') createEvent('eEvtMouseLeftButtonUp')-- createEvent('eEvtKeyDown',{x=0,y=0},eKeyEscape,0) end elseif eventType==eEvtControllerKeyDown then print('controller down: ' .. keycode) if keycode == 1000001 then --controller key A down end elseif eventType==eEvtControllerAxis then if string.match(character, 'RIGHTX') then mouse_x = keycode createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9) elseif string.match(character, 'RIGHTY') then mouse_y = keycode createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9) elseif string.match(character, 'LEFTX') then charmove_x = keycode createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25) elseif string.match(character, 'LEFTY') then charmove_y = keycode createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25) end end return falseendregisterEventHandler('keyEvent', 'keyboardHandler')[/code][quote]By the way, we have 3D Model file now for objects.[/quote]Nope just Spine.[quote]Shaders or something else?[/quote]I've updated the shader script accordingly: [url=http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)[/url]The quality of the zooming is better now and you have interactivity.I'm sorry guys, but no action parts yet. It's high up on my list.[quote]Any info on how to use spine with visionaire? How do I implement it?[/quote]Load the json-file with the path control on the bottom for objects or with 3d model file path control at character settings. Then add animations, go to animation settings and select the animation. If you want to use multiple spine files for a character you need to use a json file that links to them like this:[code]{ "multiplexer":"", "skins": [], "files": [ { "name": "PARTS/B_default/aliena_B.json" }, { "name": "PARTS/DB_default/aliena_DB.json" }, { "name": "PARTS/F_default/aliena_F.json" } ]}[/code][/quote]It's great script for keyboard character movements but unfortunately it doesn't support slopes.I know it's so complicated but if is any way for it I'm appreciate for any help.Thanks
by TinTin, 10 years ago