Is lua development considered a serious option

I ask because so much of the API seems to be missing. I’ve found work arounds for what I’ve needed so far, but I’m starting to worry that I could put a lot of work into this only to hit a brick wall down the line.

Latest problem was wishing to find the 3D position of a node in world space. Node has convertToWorldSpace, but that’s for 2D not 3D and there is no equivalent for 3D.

Okay, that shouldn’t be a problem because Node does have getNodeToWorldTransform, so all I need to do is get that transform and use it to map the point (0,0,0). Mat4 does have a transformPoint method.

Ah, but transformPoint isn’t exported to lua. transformVector is there but that in its three argument form ignores the translation part of the transform.

Oh hang on, there is another six argument form that takes the four separate components of the input vector. That would work if I give 1.0 for the w value. What’s more, if I look in lua_cocos2dx_manual.cpp at tolua_cocos2d_Mat4_transformVector it actually tests for either 3 or 6 arguments.

Seemed hopeful, but no: looking in Cocos2d.lua, there is only this

function cc.mat4.transformVector(self, vector, dst)
    return mat4_transformVector(self, vector, dst)
end

so only the 3 argument version can be used from lua

In this particular case, seeing as I am tranforming the point (0,0,0) I can just pick out four of the indexes from the transform, but it’s just luck that I have that work around.

Hence, my question…

cc.mat4.transformVector turned out to be stranger than I’d imagined, although - as it happens - usable. You can pass it a 4 vector and it will return a 4 vector (contrary to the documentation). Also, although you have to pass a table in for dst (an empty one will do) the result isn’t returned in dst (i.e., dst isn’t overwritten); the function returns the result. All a bit odd, but at least I can use it.