# Floating origin breaks rendering when camera has a parent

**URL:** https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951
**Category:** Bugs
**Tags:** floating-origin
**Created:** [October 14, 2025, 3:24pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951 "2025-10-14T15:24:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)
#### Post date: [October 14, 2025, 3:24pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/1 "2025-10-14T15:24:19Z")

</div>

Hey there!

I have been testing the new floating origin feature and found a problem when parenting the camera to another object (could be useful for a character/vehicle controller):

> **[Babylon.js Playground](https://playground.babylonjs.com/#N2CSHB)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

Is there something missing in this PG to make it work?

---

<div class="post-metadata">

### Author: ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)
#### Post date: [October 14, 2025, 4:41pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/2 "2025-10-14T16:41:30Z")

</div>

I think changing `camera.position` to `camera.globalPosition` [here](https://github.com/BabylonJS/Babylon.js/blob/7ae79629ef9e742750ed3df2da4cde22d47e80ac/packages/dev/core/src/scene.ts#L4) should do the trick. I can make a PR if you want

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [October 14, 2025, 4:58pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/3 "2025-10-14T16:58:15Z")

</div>

cc @georgie

---

<div class="post-metadata">

### Author: ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)
#### Post date: [October 15, 2025, 11:33am UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/5 "2025-10-15T11:33:47Z")

</div>

I opened a PR for the fix:

> <https://github.com/BabylonJS/Babylon.js/pull/17301>
>
> Rationale: the previous version did not work when the camera had a parent
> 
> Tes…t with https://playground.babylonjs.com/#N2CSHB
> 
> see: https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/3

---

<div class="post-metadata">

### Author: ![georgie](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/georgie/32/46049_2.png) [@georgie](https://forum.babylonjs.com/u/georgie)
#### Post date: [October 15, 2025, 1:47pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/6 "2025-10-15T13:47:03Z")

</div>

thank you for testing the feature / identifying the bug / proposing a fix! adding comment to the PR 🙂

p.s. feature is still in development so there are other known limitations (such as shadows not rendering), I will continue to checkin fixes 🙂

---

<div class="post-metadata">

### Author: ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)
#### Post date: [October 15, 2025, 2:16pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/7 "2025-10-15T14:16:42Z")

</div>

Thank you for implementing the feature in the first place! I am very excited to use it instead of my ugly `translateEverythingNow` custom function used to translate the camera to the origin with the entire scene (which was not Havok friendly at all!)

---

<div class="post-metadata">

### Author: ![georgie](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/georgie/32/46049_2.png) [@georgie](https://forum.babylonjs.com/u/georgie)
#### Post date: [October 22, 2025, 9:25pm UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/8 "2025-10-22T21:25:12Z")

</div>

@CrashMaster FYI I have an incoming change that moves FloatingOriginMode to engine instead of scene creation options.

To enable it, pass { useFloatingOriginMode: true } when creating engine.

And to enable in playground, override the createEngine function like this [Babylon.js Playground](https://playground.babylonjs.com/#Q15YF0)

I will make an announcement post as well once the PR is checked in

[FloatingOriginMode moved to engine; Fix matrix precision setter by georginahalpern · Pull Request #17334 · BabylonJS/Babylon.js](https://github.com/BabylonJS/Babylon.js/pull/17334/files)

---

<div class="post-metadata">

### Author: ![CrashMaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/crashmaster/32/23662_2.png) [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)
#### Post date: [October 23, 2025, 7:05am UTC](https://forum.babylonjs.com/t/floating-origin-breaks-rendering-when-camera-has-a-parent/60951/9 "2025-10-23T07:05:16Z")

</div>

Thanks for the update, it’s good to see the feature is making progress 🙂
