# Scene-less Nodes/TransformNodes

**URL:** <https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510>\
**Category:** Feature requests\
**Tags:** node, transformnode\
**Created:** [October 5, 2022, 11:50am UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510 "2022-10-05T11:50:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vortex](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vortex/32/26844_2.png) [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Post date:** [October 5, 2022, 11:50am UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/1 "2022-10-05T11:50:51Z")

</div>

I’m working on a project and need a TransformNode but don’t have a scene since scenes (which are worlds/saves in said project) are generated dynamically. Except for one issue: Node requires a scene, so it throws an error from the highlighted line:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/2/f278ec32410c7ae622328956b6bf245a0e384472.png)

From an engine perspective, do we need to have a scene with Nodes? There isn’t any geometry, though it could change some behavior (e.g. the `getScene()` method).

We can have the scene parameter in the constructor be optional and have another method for setting a scene.

---

<div class="post-metadata">

**Author:** ![Vortex](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vortex/32/26844_2.png) [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Post date:** [October 5, 2022, 12:44pm UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/2 "2022-10-05T12:44:54Z")

</div>

> <https://github.com/BabylonJS/Babylon.js/pull/13065>
>
> See https://forum.babylonjs.com/t/34510

---

<div class="post-metadata">

**Author:** ![Vortex](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vortex/32/26844_2.png) [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Post date:** [October 5, 2022, 1:41pm UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/3 "2022-10-05T13:41:29Z")

</div>

Hm…

[https://dev.azure.com/babylonjs/243fb099-542d-4655-b246-4dfd67131bd4/\_apis/build/builds/22287/logs/16](https://dev.azure.com/babylonjs/243fb099-542d-4655-b246-4dfd67131bd4/_apis/build/builds/22287/logs/16)  
The build fails with a ton of null errors - which makes since. Maybe instead we could have a default scene created with engine instantiation?

cc [@GeneralQuestions](https://forum.babylonjs.com/groups/generalquestions)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 5, 2022, 2:59pm UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/4 "2022-10-05T14:59:13Z")

</div>

I commented on the PR but I really do not think we should do this change ☹

In your project why not creating a dummy scene with NullEngine ?

---

<div class="post-metadata">

**Author:** ![Vortex](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vortex/32/26844_2.png) [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Post date:** [October 5, 2022, 3:04pm UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/5 "2022-10-05T15:04:20Z")

</div>

Thanks @sebavan!

The reason I needed a no-scene node was for creating default playerData in the project…

Instead of rewriting the engine, it would make more sense to simply code the project not to need default data, which I’ve been trying to remove anyway…

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [October 5, 2022, 3:37pm UTC](https://forum.babylonjs.com/t/scene-less-nodes-transformnodes/34510/6 "2022-10-05T15:37:22Z")

</div>

Could you use the dummy to create the TransformNode then:

```auto
delete tNode._scene;
delete tNode.unique;

```

? Seems like you end up with the exact same object.
