Skip to main content

Questions tagged [glm]

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

1 vote
0 answers
27 views

CGLM Not Rendering with Sokol [closed]

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
46 views

Position camera to 'head' joint's position in skeletal animation

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
54 views

Cannot transform vectors from viewport to world

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
230 views

Mouse Ray Picking: Z-Coordinate of Projected vector (glm::unproject)

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
69 views

Bullet physics incorrect rotation with more than one axis

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
99 views

Vulkan Phong shader problem

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

glm::frustum vs glm::perspectiveFov

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
  • 787
0 votes
1 answer
274 views

Unprojecting screen space to world space stops working when camera not at origin

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
98 views

Transforming a ray to NDC coordinates

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
219 views

glm::eulerAngles gives unexpected output for quaternion

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
708 views

Implementing a Maya-like orbit camera in Vulkan/OpenGL

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

How do I increment a quaternion rotation in update()?

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
  • 359
0 votes
0 answers
46 views

How to calculate angles after subsequent rotations?

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

How to make a concisely, elegantly, and human-friendly Quaternion camera?

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

How is the GLM '*' operator on quaternion and vec3 defined?

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

15 30 50 per page
1
2 3 4 5
11