eugene.litvinov Posted March 28, 2011 Posted March 28, 2011 I use next code: float angleVert = actor.getThetaAngle(); float angleHorz = actor.getPhiAngle(); quat rot = quat(0, 1, 0, angleVert) * quat(0, 0, 1, angleHorz); mat4 a = rotation(rot); and have next error: 10:38:24 source/scripts/game/objects/Player.h:272: Interpreter::parse_expression(): error before '(' in "rotation(rot)" expression In manual says: rotationVariable rotation(variable v) Description Returns rotation matrix of the input matrix, supports quat and mat4 arguments. Arguments variable v - Argument, can be of quat or mat4 type. Return value Rotation matrix. What I'm doing wrong? Thanks
frustum Posted March 28, 2011 Posted March 28, 2011 This code works fine: quat rot = quat(0, 1, 0, 0) * quat(0, 0, 1, 0); mat4 a = rotation(rot); printf("%s\n",string(a)); This code produces following error message: "test.cpp:2392: Interpreter::parse_expression(): error before '(' in "rotation(rot)" expression" int rotation = 0; quat rot = quat(0, 1, 0, 0) * quat(0, 0, 1, 0); mat4 a = rotation(rot); printf("%s\n",string(a));
eugene.litvinov Posted March 28, 2011 Author Posted March 28, 2011 I see, I find variable rotation in my base class, thanks.
Recommended Posts