thx marley,
the editor version is working now. I made the mistake of using the abstract function for finding the video.
Only thing left to find out is getting it to work outside the editor.
require("Scripts/constants/keycodes")
require("Scripts/math/math")
require("Scripts/video")
RegisterAbstractPath("")
Graphics(1440,900,32)
fw=CreateFramework()
camera = fw.main.camera
camera:SetPosition(Vec3(0,10,0))
light = CreatePointLight(10)
scene = LoadScene("abstract::scene.sbx")
---------------------------------------------
-- Video is loaded on a cube.
---------------------------------------------
cube = CreateCube()
cube:SetPosition(Vec3(0,10,5))
TheoraVideo:Init()
videoclip = TheoraVideo:CreateMaterial("video.ogg", "Videotest")
cube:Paint(videoclip,1)
videoclip:SetLoop(1)
--videoclip:Play(1)
---------------------------------------------
-- Video is loaded on a cube.
---------------------------------------------
camRotation=Vec3(0,0,0)
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2)
HideMouse(1)
while KeyHit(KEY_ESCAPE)==0 do
--Camera look
gx=Curve(MouseX()- GraphicsWidth()/2,gx,10)
gy=Curve(MouseY()- GraphicsHeight()/2,gy,10)
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2)
camRotation.x = camRotation.x+gy /10
camRotation.y = camRotation.y-gx /10
camera:SetRotation(camRotation,1)
--keys
move = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10)
strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10)
camera:Move(Vec3(strafe /11,0,move/11))
fw:Update()
fw:Render()
Flip(0)
end
I am sure that there was this video or article were Niosop showed how to set this up. I have send him a message.