New answers tagged

0

Alright, figured this out. I needed to put the child object into the coordinate system of it's parent, before parenting it. This was accomplished by multiplying the inverse matrix of the parent by the matrix of the child, and applying the resulting matrix to the child. Below are the changes I made to my code to accomplish this: // if physics object has a ...


0

Once I have generated all of the triangles, I weld the vertices, and get face and vertex normals. Once that's done, I stuff the vertex data (including position, colour) into a buffer and call glDrawArrays. Here are some codes: void get_vertices_and_normals_from_triangles(vector<triangle> &t, vector<vec3> &fn, vector<vec3> &v, ...


Top 50 recent answers are included