I have 3 lua files, Init.lua, FreeCamera.lua and Camera.lua ,
init.lua calls require "Core.Camera.FreeCamera"
Free Camera:
module(...)
require "Core.Camera.Camera"
local M = {}
FreeCamera = M
M = Class( Camera )
function M:__constructor(x,y,z)
self.Active = false
self.x = x
self.y = y
self.z = z
end
and
module(...)
local M = {}
Camera = M
M = Class()
function M:__constructor(x,y,z)
self.Active = false
self.x = x
self.y = y
self.z = z
end
FreeCamera "inherits" Camera kind of. I am trying to require FreeCamera in my init file and I am getting this:
..\Content\Modules\Core\Camera\FreeCamera.lua:12: attempt to call global 'require' (a nil value). Any idea Why? Am I using require the right way? Clearly it is getting into FreeCamera.lua, which is great, but it gets stuck on the next require.