janykim Posted October 20, 2015 Share Posted October 20, 2015 An example because I do not know what argument are to enter ObjectTerrain objTerrain[0]; .... ObjectTerrain terrain = add_editor(node_load("map/map.node", 0)); terrain.setWorldTransform(Mat4(translate(0.0f, 0.0f, 1.532f))); objTerrain.append(terrain); ... vec4 texcoord; WorldIntersectionTexCoord intersection = new WorldIntersectionTexCoord(); int isurf = 1; int holes = 0; int ret = objTerrain[0].getIntersection(p0, p1, texcoord, isurf, holes); error log - unknown type of argument(vec4) It is to put any value? Link to comment
maxi Posted October 20, 2015 Share Posted October 20, 2015 Hi Jany, Unfortunately, its a mistake in docs about argument types, correct types will be: variable v - Variable defining the return array content. It can be one of the following: ObjectIntersection point - The intersection point. ObjectIntersectionNormal normal - The intersection point normal. ObjectIntersectionTexCoord texcoord - The intersection point texture coordinates along the X and the Y axes (the Z and the W values are always equal to zero). Link to comment
Recommended Posts