# Position of the ground is fixed relative to my camera

**URL:** <https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590>\
**Category:** Questions\
**Created:** [October 25, 2019, 10:11pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590 "2019-10-25T22:11:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![issam\_abdelhedi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/issam_abdelhedi/32/5064_2.png) [@issam\_abdelhedi](https://forum.babylonjs.com/u/issam_abdelhedi)\
**Post date:** [October 25, 2019, 10:11pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/1 "2019-10-25T22:11:20Z")

</div>

unfortunately I have a big problem to solve in the shortest time:

the mission is to add many objects in the scene after a click with the mouse. Following an impossibility to have the intersection directly with the scene (I think it’s impossible) I had to add a plan at the scene.(like a ground)

var pickPlane = BABYLON.Mesh.CreatePlane(“mesh1”, 10000, scene);  
pickPlane.billboardMode = BABYLON.Mesh.BILLBOARDMODE\_ALL;

the problem is that I have to put the position of this plan is fixed relative to my camera or to find a solution without ground: /

thanks for help 🙂

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [October 25, 2019, 10:43pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/2 "2019-10-25T22:43:35Z")

</div>

Hey @issam_abdelhedi,

Would love to help, but it’s a little difficult to understand the problem. Can you provide a playground that we can look at in order to help?

---

<div class="post-metadata">

**Author:** ![issam\_abdelhedi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/issam_abdelhedi/32/5064_2.png) [@issam\_abdelhedi](https://forum.babylonjs.com/u/issam_abdelhedi)\
**Post date:** [October 25, 2019, 11:05pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/3 "2019-10-25T23:05:11Z")

</div>

it’s possible to add object with mouse click directly at scene (without ground ) !!!

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [October 25, 2019, 11:56pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/4 "2019-10-25T23:56:49Z")

</div>

I’m not sure this is the most elegant solution ever, but it seems to work ok.

[https://playground.babylonjs.com/#BSFPWL](https://playground.babylonjs.com/#BSFPWL)

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs/32/44_2.png) [@Gijs](https://forum.babylonjs.com/u/Gijs)\
**Post date:** [October 26, 2019, 1:28am UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/5 "2019-10-26T01:28:56Z")

</div>

You can also pick a virtual plane:

[https://playground.babylonjs.com/#BSFPWL#1](https://playground.babylonjs.com/#BSFPWL#1)

Edit:

I just realized you don’t even need a plane…  
[https://playground.babylonjs.com/#BSFPWL#2](https://playground.babylonjs.com/#BSFPWL#2)

---

<div class="post-metadata">

**Author:** ![issam\_abdelhedi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/issam_abdelhedi/32/5064_2.png) [@issam\_abdelhedi](https://forum.babylonjs.com/u/issam_abdelhedi)\
**Post date:** [October 26, 2019, 11:54am UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/6 "2019-10-26T11:54:16Z")

</div>

thanks for ur time @Gijs and @PirateJC , i just add camera.attachControl(canvas, true); to your code @Gijs .  
I want when i rotate the camera and i add a new sphere, the position of the new sphere will be at the origin(like i don’t rotate the scene ).

I hope you understand me 🙂

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs/32/44_2.png) [@Gijs](https://forum.babylonjs.com/u/Gijs)\
**Post date:** [October 26, 2019, 5:21pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/7 "2019-10-26T17:21:40Z")

</div>

Here’s a new playground with a new placing code:

[https://playground.babylonjs.com/#BSFPWL#3](https://playground.babylonjs.com/#BSFPWL#3)

When you increase the ground size, the problem seems to be that when you rotate, the plane goes through the camera, is that the problem you are facing? Does this playground come closer to completing your mission?

---

<div class="post-metadata">

**Author:** ![issam\_abdelhedi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/issam_abdelhedi/32/5064_2.png) [@issam\_abdelhedi](https://forum.babylonjs.com/u/issam_abdelhedi)\
**Post date:** [October 26, 2019, 7:54pm UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/8 "2019-10-26T19:54:44Z")

</div>

> [@Gijs](#):
>
> When you increase the ground size, the problem seems to be that when you rotate, the plane goes through the camera, is that the problem you are facing? Does this playground come closer to completing your mission?

the problem is that when I rotate the scene, the position of the scene does not remain fixed with the camera

---

<div class="post-metadata">

**Author:** ![issam\_abdelhedi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/issam_abdelhedi/32/5064_2.png) [@issam\_abdelhedi](https://forum.babylonjs.com/u/issam_abdelhedi)\
**Post date:** [October 28, 2019, 9:07am UTC](https://forum.babylonjs.com/t/position-of-the-ground-is-fixed-relative-to-my-camera/6590/9 "2019-10-28T09:07:10Z")

</div>

I thnik that what i want :  
[https://playground.babylonjs.com/#BSFPWL#6](https://playground.babylonjs.com/#BSFPWL#6)  
thanks for u 😃
