-2

Tried different ways to make a free camera. However, Gimbal Lock spoils everything. I didn't find any ready code, I can't solve the problem by myself. Is that even possible?

German
  • 321
  • 1
  • 7
  • Yes its possible. Drop the Euler angles (bulshit) and use [Understanding 4x4 homogenous transform matrices](https://stackoverflow.com/a/28084380/2521214) at the end you got links with examples of exactly that (player and camera control) – Spektre Aug 09 '19 at 08:05

1 Answers1

2

Yes of course it is possible. Or rather, because there's no camera in OpenGL in the first place any occurrences of gimbal lock are upon whoever wrote the transformation manipulation code.

I guess you're using Euler angles (i.e. 3 angles around X, Y and Z axis). Use a quaternion or a plain rotation matrix instead.

datenwolf
  • 159,371
  • 13
  • 185
  • 298