#### Category : glm-math

I’m trying to handle Sphere->OBB Resolution in 3D space and it all seems works however I seem to have an issue where the velocity after collision is higher than before, the sphere will never come to a complete stop and continue bouncing everywhere. I’ve tried implementing elastic collision where my first object is the moving ..

I’m calculating tangents & normals per-vertex and it works perfectly when the mesh’s position is set to (0, 0, 0), but when I try to add to the position and recalculate the tangents/normals the object gets deformed in a weird way. this is the mesh when its position is set to (0, 0, 0) which ..

GLM_FUNC_QUALIFIER mat<4, 4, T, Q> lookAtRH(vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up) { vec<3, T, Q> const f(normalize(center – eye)); vec<3, T, Q> const s(normalize(cross(f, up))); vec<3, T, Q> const u(cross(s, f)); mat<4, 4, T, Q> Result(1); Result = s.x; Result = s.y; Result = s.z; Result ..

When doing mouse picking i am getting extremely small numbers for my world coordinates such as X: -0.00995918 Y: 0.000806411 Z: -0.99995 Am i doing something wrong here with the x and y coordinates since the Z axis appears to be correct. I am using glm::intersectLineTriangle() to test if the line is pointing at the ..

I’m trying to calculate normals by multiplying 3 vectors to extrude vertices along those normals, it only works for half of the object, see this image as a reference (the pink lines represent the extruded vertices) here’s how the normals are calculated: for (Vertex& v : vertices) { glm::vec3 normal = { 0,0,0 }; for ..

I am trying to get a direction vector to where my cursor is on the screen, however it gives me large values instead of the actual values. When doing mouse picking I am getting extremely small numbers for my world coordinates such as Mouse is pointing at World X: 4.03225e-05 Y: -0.00048387 Z: -1 Am ..

I’m trying to extrude a mesh along it’s vertices, to do that I need to calculate normals per-vertex so I can eventually calculate the new vertex position, how can I achieve something like this EDIT 1: this is the way that I calculate cross product: const glm::vec3& a = v.position; const glm::vec3& b = vertices[i .. How can we translate the Screen Space coordinate to World space coordinate. in the below image the circle is drawn at position 0.0 , 0.0 , 0.0 Now if we move it to position -200 in x axis. if we get the screen space vales by clicking on the centre point of the circle than ..