robert.blodgett Posted September 1, 2016 Share Posted September 1, 2016 I'm getting a compile error with this ... what is the correct syntax for getting values returned from a script to c++? Mat4 matrix; matrix.setIdentity(); const Variable var = (*theEngine)->runWorldFunction((Variable)"getViveCameraPosition", (Variable)(matrix)); matrix = VariableToType<Mat4>(Interpreter::get(), var); // compile error The compile error: error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Unigine::VariableToType<Unigine::Math::dmat4>' (or there is no acceptable conversion) This script function: Mat4 getViveCameraPosition(Mat4 matrix) { ... Link to comment
robert.blodgett Posted September 1, 2016 Author Share Posted September 1, 2016 Ok, I got it to work: Mat4 matrix; matrix.setIdentity(); const Variable var = (*theEngine)->runWorldFunction((Variable)"getViveCameraPosition", (Variable)(matrix)); matrix = VariableToType<Mat4>(Interpreter::get(), var).value; Link to comment
Recommended Posts