{"id":13691,"date":"2024-10-19T13:14:00","date_gmt":"2024-10-19T17:14:00","guid":{"rendered":"https:\/\/www.sceneri.com\/?post_type=sceneri-docs-glossar&p=13691"},"modified":"2024-11-12T03:56:00","modified_gmt":"2024-11-12T08:56:00","slug":"gimbal-lock","status":"publish","type":"sceneri-docs-glossar","link":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/","title":{"rendered":"Gimbal Lock"},"content":{"rendered":"
\n

Overview<\/h3>\n

In game development, gimbal lock is a problem that can occur when using Euler angles to represent the orientation of an object. Euler angles are three angles that are used to represent the orientation of an object in space. The three angles are called roll, pitch, and yaw.<\/span><\/p>\n<\/div>\n

\n

Gimbal lock occurs when two of the three Euler angles become equal to each other. This can happen when the object is rotated in a specific way. When gimbal lock occurs, the third Euler angle becomes undefined. This can cause problems with the way the object is rendered or animated.<\/span><\/p>\n<\/div>\n

\n

There are a few ways to avoid gimbal lock in game development. One way is to use quaternions instead of Euler angles. Quaternions are a more robust way of representing the orientation of an object in space. They are less likely to cause gimbal lock.<\/span><\/p>\n<\/div>\n

\n

Another way to avoid gimbal lock is to use a technique called “gimbal lock avoidance.” Gimbal lock avoidance is a mathematical algorithm that is used to prevent gimbal lock from occurring.<\/span><\/p>\n<\/div>\n

\n

Here are some of the benefits of avoiding gimbal lock in game development:<\/span><\/p>\n<\/div>\n

\n
    \n
  • \n
    Prevents rendering errors:<\/strong><\/span> Gimbal lock can cause rendering errors. This is because the third Euler angle becomes undefined when gimbal lock occurs. This can cause the object to be rendered incorrectly.<\/span><\/div>\n<\/li>\n
  • \n
    Prevents animation errors:<\/strong><\/span> Gimbal lock can also cause animation errors. This is because the object’s animation may become erratic when gimbal lock occurs. This can make the animation look unrealistic.<\/span><\/div>\n<\/li>\n
  • \n
    Improves performance:<\/strong><\/span> Gimbal lock avoidance can improve performance. This is because the game engine does not need to check for gimbal lock every frame.<\/span><\/div>\n<\/li>\n<\/ul>\n<\/div>\n
    \n

    However, there are also some drawbacks to avoiding gimbal lock in game development:<\/span><\/p>\n<\/div>\n

    \n
      \n
    • \n
      Increased complexity:<\/strong><\/span> Gimbal lock avoidance can increase the complexity of the game engine. This is because the game engine needs to be able to calculate the gimbal lock avoidance algorithm every frame.<\/span><\/div>\n<\/li>\n
    • \n
      Reduced precision:<\/strong><\/span> Gimbal lock avoidance can reduce the precision of the object’s orientation. This is because the gimbal lock avoidance algorithm is a mathematical approximation.<\/span><\/div>\n<\/li>\n
    • \n
      Increased memory usage:<\/strong><\/span> Gimbal lock avoidance can increase memory usage. This is because the game engine needs to store the results of the gimbal lock avoidance algorithm.<\/span><\/div>\n<\/li>\n<\/ul>\n<\/div>\n
      \n

      Overall, gimbal lock is a problem that can occur when using Euler angles to represent the orientation of an object. There are a few ways to avoid gimbal lock in game development. By avoiding gimbal lock, you can improve the rendering and animation of your game.<\/span><\/p>\n<\/div>\n<\/div><\/div><\/div><\/div><\/div>\n","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":false},"sceneri-docs-tag":[],"class_list":["post-13691","sceneri-docs-glossar","type-sceneri-docs-glossar","status-publish","hentry"],"acf":[],"yoast_head":"\nGimbal Lock - Sceneri<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gimbal Lock\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/\" \/>\n<meta property=\"og:site_name\" content=\"Sceneri\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sceneriapp\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-12T08:56:00+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@sceneriapp\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/\",\"url\":\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/\",\"name\":\"Gimbal Lock - Sceneri\",\"isPartOf\":{\"@id\":\"https:\/\/www.sceneri.com\/#website\"},\"datePublished\":\"2024-10-19T17:14:00+00:00\",\"dateModified\":\"2024-11-12T08:56:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sceneri.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gimbal Lock\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sceneri.com\/#website\",\"url\":\"https:\/\/www.sceneri.com\/\",\"name\":\"Sceneri\",\"description\":\"Collaborate in 3D.\",\"publisher\":{\"@id\":\"https:\/\/www.sceneri.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sceneri.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.sceneri.com\/#organization\",\"name\":\"Sceneri\",\"url\":\"https:\/\/www.sceneri.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sceneri.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.sceneri.com\/wp-content\/uploads\/2024\/06\/sceneri-logo-inverted.png\",\"contentUrl\":\"https:\/\/www.sceneri.com\/wp-content\/uploads\/2024\/06\/sceneri-logo-inverted.png\",\"width\":1630,\"height\":512,\"caption\":\"Sceneri\"},\"image\":{\"@id\":\"https:\/\/www.sceneri.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/sceneriapp\",\"https:\/\/x.com\/sceneriapp\",\"https:\/\/www.reddit.com\/r\/sceneriapp\/\",\"https:\/\/www.twitch.tv\/sceneriapp\",\"https:\/\/www.youtube.com\/@sceneriapp\",\"https:\/\/www.linkedin.com\/company\/sceneri\/\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Gimbal Lock - Sceneri","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/","og_locale":"en_US","og_type":"article","og_title":"Gimbal Lock","og_url":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/","og_site_name":"Sceneri","article_publisher":"https:\/\/www.facebook.com\/sceneriapp","article_modified_time":"2024-11-12T08:56:00+00:00","twitter_card":"summary_large_image","twitter_site":"@sceneriapp","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/","url":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/","name":"Gimbal Lock - Sceneri","isPartOf":{"@id":"https:\/\/www.sceneri.com\/#website"},"datePublished":"2024-10-19T17:14:00+00:00","dateModified":"2024-11-12T08:56:00+00:00","breadcrumb":{"@id":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sceneri.com\/sceneri-docs-glossar\/gimbal-lock\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sceneri.com\/"},{"@type":"ListItem","position":2,"name":"Gimbal Lock"}]},{"@type":"WebSite","@id":"https:\/\/www.sceneri.com\/#website","url":"https:\/\/www.sceneri.com\/","name":"Sceneri","description":"Collaborate in 3D.","publisher":{"@id":"https:\/\/www.sceneri.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sceneri.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.sceneri.com\/#organization","name":"Sceneri","url":"https:\/\/www.sceneri.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sceneri.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.sceneri.com\/wp-content\/uploads\/2024\/06\/sceneri-logo-inverted.png","contentUrl":"https:\/\/www.sceneri.com\/wp-content\/uploads\/2024\/06\/sceneri-logo-inverted.png","width":1630,"height":512,"caption":"Sceneri"},"image":{"@id":"https:\/\/www.sceneri.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sceneriapp","https:\/\/x.com\/sceneriapp","https:\/\/www.reddit.com\/r\/sceneriapp\/","https:\/\/www.twitch.tv\/sceneriapp","https:\/\/www.youtube.com\/@sceneriapp","https:\/\/www.linkedin.com\/company\/sceneri\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.sceneri.com\/wp-json\/wp\/v2\/sceneri-docs-glossar\/13691"}],"collection":[{"href":"https:\/\/www.sceneri.com\/wp-json\/wp\/v2\/sceneri-docs-glossar"}],"about":[{"href":"https:\/\/www.sceneri.com\/wp-json\/wp\/v2\/types\/sceneri-docs-glossar"}],"wp:attachment":[{"href":"https:\/\/www.sceneri.com\/wp-json\/wp\/v2\/media?parent=13691"}],"wp:term":[{"taxonomy":"sceneri-docs-tag","embeddable":true,"href":"https:\/\/www.sceneri.com\/wp-json\/wp\/v2\/sceneri-docs-tag?post=13691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}