Jump to content

omid3098

Members
  • Posts

    375
  • Joined

  • Last visited

Recent Profile Visitors

21,223 profile views

omid3098's Achievements

Newbie

Newbie (1/14)

11

Reputation

  1. Thanks. I hope that is easy enough to be implemented into the engine itself.
  2. Is morphing supported in Leadwerks 3? if not, is this on the LE3 roadplan?
  3. now it works using this code: require("Scripts/class") require("Scripts/constants/keycodes") require("Scripts/hooks") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() if KeyDown(KEY_UP)==1 then CameraZoom(fw.main.camera,0.5) end if KeyDown(KEY_DOWN)==1 then CameraZoom(fw.main.camera,1.0) end end function object:Free() self.super:Free() end end
  4. Programmer is doing bugfix since more than 2 months and I don't have permission to access him. this is my CameraManager.lua: require("Scripts/class") require("Scripts/constants/keycodes") require("Scripts/hooks") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) --object.cameraFOV = CameraZoom(camera,1.0) SetFarDOFRange(2,5) SetFarDOFStrength(1) SetFarDOF(1) function object:DHook() -- Test if keys are working if KeyDown(KEY_U)==1 then SetFarDOF(1) end if KeyDown(KEY_Y)==1 then SetFarDOF(0) end end AddHook("Flip" , object.DHook ) function object:Free() RemoveHook("Flip" , object.DHook ) self.super:Free() end end I can enable/Disable DOF with keys but I have no Ideas how to access camera FOV.
  5. it says value at index (1) is not an object
  6. Ok. I'm a dump. would you please describe more? CameraZoom is only for C and C++ and there is nothing for LUA. I just have to open Editor and edit some LUA codes to play with camera and do some trailer. Edit: this code gives "Malformed number near 0.5f" error. CameraZoom(camera, 0.5f)
  7. Hi. I am trying to control camera FOV using two keys in Lua (to increase and decrese) but I cant access to main Camera FOV. I have a CameraManager node in the scene and the code is something like this: require("Scripts/class") require("Scripts/constants/keycodes") require("Scripts/hooks") local class=CreateClass(...) function class:CreateObject(model) function object:DHook() if KeyDown(KEY_U)==1 then CameraZoom(45.0) -- or what? how should I use CameraZoom? end end AddHook("Flip" , object.DHook ) function object:Free() RemoveHook("Flip" , object.DHook ) self.super:Free() end end there were CameraZoom(cam,value) in the forum but I dont know what is cam or how I can create that to use Camera zoom. actually tried cam=fw.main.camera but that is for framework I think. I did not write other parts of this code and also I don't have access to our programmer. and I'm not dump thanks before
×
×
  • Create New...