Skip to main content

Questions tagged [glm]

GLM is a C++ math library based on the GLSL language.

Filter by
Sorted by
Tagged with
1 vote
0 answers
48 views

I've setup cglm from a wrap configured with Meson, and have copied one of the samples from https://github.com/floooh/sokol-samples/tree/master (cube-sapp, to be exact). I've tried to replace sokol's ...
Denzel's user avatar
  • 11
0 votes
2 answers
96 views

Finished this great tutorial on skeletal animation: https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation All works as expected, no issues! Here is what matrixes I use to achieve skeletal ...
Avi's user avatar
  • 188
1 vote
0 answers
72 views

I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions. However, i stumbled upon a very ...
Bellaedris's user avatar
0 votes
1 answer
350 views

I've run into a curious issue when implementing ray picking in my game engine. It seems the Z coordinate of the Projected matrix has to be ever so slightly more than ...
Josh McCord's user avatar
0 votes
0 answers
98 views

im try to integrate currently bullet into my game framework. But when i try to set the rotation for an rigidbody with more the 1 axis i recive the current result It looks that the rotation is ...
Andy's user avatar
  • 13
0 votes
1 answer
146 views

Light increases its intensity as it come closer the origin model. Vertex Shader: ...
BrutaL _'s user avatar
0 votes
1 answer
1k views

When I use glm::perspectiveFov(90.0f,512.0f,512.0f,1.0f,256.0f) I receive a working perspective projection with 90° in both x and y, as seen below (camera is in ...
Raildex's user avatar
  • 812
0 votes
1 answer
322 views

I'm trying to implement screen space to world space in my engine to allow object selection in editor. I understand that the process should essentially be the reverse of projection. So to go from world ...
ZachMakesGames's user avatar
0 votes
1 answer
145 views

I am trying to have ray tracing with a mesh using NanoRT and I want to be able to allow for a model transform on top of my view and projection transforms. I have successfully transformed my ray from ...
Felipe Gutierrez's user avatar
0 votes
1 answer
259 views

I used the euler->mat4->quat to give the right result, but euler->quat gives the wrong result - is there something I did wrong? ...
Zero Skyline's user avatar
1 vote
1 answer
835 views

I want to create an orbit camera with zooming, panning, and rotation. I used the following examples to create cameras: https://stackoverflow.com/questions/54400422/how-to-implement-altmmb-camera-...
Wusiki Jeronii's user avatar
1 vote
1 answer
1k views

When working with rotations expressed as angles, it makes sense to be able do to something like void GameLoop::update(){ pawn.rotation.x += 0.01; } And slowly ...
TaylorE's user avatar
  • 369
0 votes
0 answers
62 views

I have a class that manipulates a model matrix in opengl: ...
Aziz Hakberdiev's user avatar
2 votes
1 answer
1k views

I have spent three weeks struggling with the quaternion camera! Now I have two Implementations. One has some kind of gimbal lock issue or something like that. Another one is totally anti-human ( I ...
potter john's user avatar
1 vote
1 answer
1k views

Using the definition of quaternion rotation given here: So the equivalent code in GLM of the above formula would be like this: ...
peter's user avatar
  • 21
1 vote
0 answers
234 views

I have an issue with calculating transformation matrices for animation mesh deformation using glm in c++ I have a class Bone which does the basic calculation which does have a current local position (...
NoFr1ends's user avatar
1 vote
1 answer
1k views

I'm having a couple of problems while rotating an object every frame with GLM. First problem I'm trying to rotate the object with a small increase using quaternion multiplication. ...
Daniel Marques's user avatar
0 votes
1 answer
408 views

For a game that I am developing I moved from Bullet physics to NVidia Physx. The problem that I have is the following. I used to have a translation from bullet's rigid body orientation quaternion to ...
Mike F's user avatar
  • 103
0 votes
0 answers
798 views

I'm attempting a very basic camera with GLM in C++ that has full pitch and yaw rotation. The game I'm planning to make will eschew triangles in favor of flat scaled/rotated sprites to represent ...
Dunyctor's user avatar
2 votes
1 answer
299 views

I am currently working on my arm/weapon rig for an fps game written in a custom engine. I am to the point where I am implementing the movement of the arms/weapon (hereby referred to as weapon), for ...
whitwhoa's user avatar
  • 201
0 votes
1 answer
758 views

I understand to extract clip planes from the perspective matrix one can follow the methodology laid out by Gribb-Hartman as documented here: http://www.cs.otago.ac.nz/postgrads/alexis/planeExtraction....
Humility Dev's user avatar
0 votes
1 answer
1k views

I've been trying to work out how to render a mirror for a while now, but a lot of resources I find either use very outdated tools I'm not familiar with, appear to be college slides referencing other ...
Ethan McTague's user avatar
0 votes
1 answer
539 views

I'd like to know if it's possible to calculate a child's world translation, rotation and scale individually. I'm used to seeing devs resorting to matrix multiplication and then decomposition, like so: ...
Daniel Marques's user avatar
0 votes
1 answer
489 views

I'm trying to convert a normalized unit vector, representing an entity heading, into a rotation matrix for rendering. The problem is that I'm using an (apparently) unusual forward vector for my ...
Nairou's user avatar
  • 634
1 vote
1 answer
7k views

I just want to draw a simple triangle using GL_LINES primitive with orthographic projection matrix. This is my vertices... ...
Enthalpy127's user avatar
0 votes
0 answers
270 views

I am attempting to rotate the sprites in my game, but they get stretched whenever it happens. I know that it is due to the screen not being square, but I can not figure out the correct way to ...
Aubrey Champagne's user avatar
3 votes
1 answer
712 views

I am implementing cascade shadow mapping algorithm and currently stuck with matrix transformations - my AABBs, when projected in light space are pointing in the direction opposite to the light: I was ...
shybovycha's user avatar
0 votes
1 answer
1k views

I have researched this a lot and so far all the examples, tutorials etc always use the following order: Scale * Rotate * Translate but for some reason this order must always be backwards in my Scene ...
Gasim's user avatar
  • 199
0 votes
1 answer
2k views

I'm attempting to parent a bullethole decal to a dynamic object. I've figured out how to set the correct position for the bullethole object so that it shows at the correct position of the dynamic ...
whitwhoa's user avatar
  • 201
0 votes
1 answer
234 views

I'm making a game with marching cubes terrain (I know very original idea) and I don't exactly know how to color it. I have a system to do it, I just need to know how to interpolate it where it's not ...
Austin128's user avatar
0 votes
1 answer
3k views

Heyho :) I'm trying to convert world coordinates to screen coordinates. I have available: fov, screen width, screen height, camera position, camera angle and obviously the position of the object in ...
itsame's user avatar
  • 1
1 vote
2 answers
2k views

Feel like I should know this, maybe I'm just over thinking it. What I'm attempting to do is create a bullet hole plane/texture object on top of an existing mesh when a ray cast returns a hit point. I ...
whitwhoa's user avatar
  • 201
3 votes
1 answer
2k views

I'm writing a camera which needs to change a quaternion to Euler angles than change them back, it only works when the yaw is less than 90 degrees, I wrote a example to check: ...
ravenisadesk's user avatar
0 votes
1 answer
548 views

I've been trying to get a cascaded shadow mapping system implemented on my engine, though it appears to be that the bounding boxes for the cascades aren't correct. The part I'm interested in can be ...
Héctor Miguel Ramírez Cano's user avatar
1 vote
0 answers
135 views

I am writing a game using GLFW, GLEW, GLM and Bullet3 in C++. Its a Maze with holes. I am doing the floor with rectangles (wich is 2 GL_TRIANGLES). I want to make some woles (circles), to the ball ...
David Pires's user avatar
0 votes
1 answer
335 views

I have a camera that follows the position and direction of the player. These are updated using spin and velocity. The velocity is updated like so: ...
user1032677's user avatar
2 votes
1 answer
528 views

I'm currently implementing Skinning using Assimp as my asset importer. I've relied heavily on the following tutorial in order to skin meshes (http://ogldev.atspace.co.uk/www/tutorial38/tutorial38.html)...
Sammi3's user avatar
  • 229
0 votes
0 answers
2k views

For this project I am using GLFW, glad and glm. My window looks like this: The dimensions of the window are correct, but the viewport is stretched, making my square into a rectangle. How do I use a ...
user avatar
2 votes
1 answer
3k views

I am trying to convert the orientation of an OpenVR controller that I have stored as a glm::vec3 of Euler angles into a ...
Vittorio Romeo's user avatar
2 votes
1 answer
2k views

I'm currently writing a game engine from scratch for learning purposes. I just started implementing transformations. I know how they work in general but I'm not sure how to implement them efficiently ...
Tin Svagelj's user avatar
1 vote
1 answer
491 views

I am making a game in opengl and am trying to get a camera to follow an airplane. How can I get the camera to match the roll, pitch, and yaw of the plane? I am using glm as my math library. Thanks!
That_one_guy's user avatar
1 vote
1 answer
361 views

I have implemented a collision and response system based on the famous "Improved Collision detection and Response" paper. However I'm having an issue with objects sliding backwards on slopes. I ...
whitwhoa's user avatar
  • 201
0 votes
2 answers
859 views

I am trying to implement SAT collision detection between 2 OBBs, however, I am getting a lot of false positives, can anyone help me figure out what I am doing wrong, thank you in advance. This is my ...
Shubham Sachdeva's user avatar
1 vote
0 answers
153 views

I have a square of points {<0, 0, 0>, <6, 0, 0>, <6,0, 6>, <0,0,6>} (The square is placed at the origin in the xz plane in opengl). Want to apply a transformation/s on the square and make ...
Argha Chakraborty's user avatar
1 vote
1 answer
3k views

I have a vec3 to represent my object's orientation/rotation but the glm::rotate method expects a quaternion. If I just convert ...
Thomas Linssen's user avatar
0 votes
1 answer
3k views

I need to make a camera rotation system similar to the one here http://madebyevan.com/webgl-path-tracing/ To rotate, press the Left mouse button and drag. So far I figured a basic idea of how this ...
gallickgunner's user avatar
0 votes
0 answers
72 views

I have been working on a component based engine with nested game objects each with there own transformation's. Each game object calculates its position in the world based on its parents world ...
0xen's user avatar
  • 463
1 vote
1 answer
3k views

I have a camera that works with Pitch and Yaw (no roll) and compute the look at matrix as following : ...
FloFu's user avatar
  • 392
1 vote
0 answers
140 views

I am trying to write the depth value in a G-buffer pass and then read it later to determine the world-space location of a fragment. I have this shader which renders my G-buffer pass ...
Geklmintendon't of Awesome's user avatar
1 vote
0 answers
270 views

I have a buffer I am rendering gl_FragDepth (remapped to range 0-1) to a color buffer (instead of color) in OpenGL I would like to, in a second pass, read this ...
Geklmintendon't of Awesome's user avatar