# How to make an infinity of Sphere and make them rotate around like stars at sky

**URL:** <https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959>\
**Category:** Questions\
**Tags:** gui, material, shader, animation, camera\
**Created:** [August 11, 2022, 9:08pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959 "2022-08-11T21:08:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 11, 2022, 9:08pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/1 "2022-08-11T21:08:32Z")

</div>

hi guys I’m new to babylon js

can anyone help me out with this

how to make an infinity of Sphere and make them rotate around

---

<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:** [August 11, 2022, 9:35pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/2 "2022-08-11T21:35:34Z")

</div>

Hey!  
Define “infinity” ?

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 11, 2022, 9:43pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/3 "2022-08-11T21:43:59Z")

</div>

hello @Deltakosh @Blake thank you for you’re reply

what I’m expecting is like this

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/7/576bd4e20905d32fe1e43b733e11769a12f35fac.jpeg)

a lot of spheres which can move freely everywhere

---

<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:** [August 11, 2022, 10:18pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/4 "2022-08-11T22:18:48Z")

</div>

Ok:) I would recommend to use instances or even thin instances: [Thin Instances | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/divingDeeper/mesh/copies/thinInstances)

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 11, 2022, 10:27pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/5 "2022-08-11T22:27:47Z")

</div>

@Deltakosh thank you for replying

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

its going towards the left hand side but I need them to move freely everywhere with low quantity of spheres

---

<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:** [August 11, 2022, 11:20pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/6 "2022-08-11T23:20:04Z")

</div>

the spheres are not moving here, the camera is.

You need to change their positions every frame to position them where you want.

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 11, 2022, 11:41pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/7 "2022-08-11T23:41:16Z")

</div>

@sebavan thank you for your reply  
therefore can you please define it b’cause I didn’t get you

---

<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:** [August 12, 2022, 12:33am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/8 "2022-08-12T00:33:02Z")

</div>

You should first have a read at our doc to be more familiar with the various terminology we are using on the forum: [Welcome to Getting Started with Babylon.js | Babylon.js Documentation](https://doc.babylonjs.com/start)

Also how familiar are you with 3d? js ? in general. This could help adapting our answers.

---

<div class="post-metadata">

**Author:** ![nasimiasl](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nasimiasl/32/34_2.png) [@nasimiasl](https://forum.babylonjs.com/u/nasimiasl)\
**Post date:** [August 12, 2022, 3:41am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/9 "2022-08-12T03:41:57Z")

</div>

@wilfred

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#1ZEABJ%23205)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/6/661e49883bb980d929ec402b97c82fe84d72b462.jpeg)  
i am not sure that can be useful or not but just wanna share it

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 12, 2022, 6:00am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/10 "2022-08-12T06:00:59Z")

</div>

hi @nasimiasl thank you for you’re reply  
and its so mean 🙂 🥰

but what I’m looking forward is like

[https://thumbs.dreamstime.com/videothumb\_large11084/110840660.mp4](https://thumbs.dreamstime.com/videothumb_large11084/110840660.mp4)

take a look at this video guys, thank you

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [August 12, 2022, 6:11am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/11 "2022-08-12T06:11:49Z")

</div>

That’s more like a snow particle system effect.

Take a look at [Particle System Intro | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/particles/particle_system/particle_system_intro)

And you can [search for code playgrounds](https://doc.babylonjs.com/playground?q=snow&type=code) like say this one:

> **[Babylon.js Playground](https://playground.babylonjs.com/#06DDLW%2327)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 13, 2022, 7:35pm UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/12 "2022-08-13T19:35:43Z")

</div>

I am very greatful for all you’re response! @nasimiasl @sebavan @Deltakosh

this is what I was looking forward thx @inteja

> **[Babylon.js Playground](https://playground.babylonjs.com/#06DDLW%2327)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

but can you suggest me how that magnetic Behavior that’s done through Particle when its hovered can you guys take a look at this example guys

> **[Richard Mattka | Portfolio](http://richardmattka.com/)**
>
> Richard Mattka is an award-winning Creative Director, Tehcnologist and Author. Currently available for Freelance, exploring AR/VR, Interactive, Film, WebGL, Shaders, 3D, and Visual FX👽

I’m been doing such things so

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [August 14, 2022, 12:19am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/13 "2022-08-14T00:19:07Z")

</div>

Looking carefully at that link, it doesn’t seem to be using any kind of magnetic attraction as such. This effect could be achieved simply by rotating and moving the camera in response to the current pointer screen XY position.

---

<div class="post-metadata">

**Author:** ![wilfred](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wilfred/32/29350_2.png) [@wilfred](https://forum.babylonjs.com/u/wilfred)\
**Post date:** [August 14, 2022, 7:16am UTC](https://forum.babylonjs.com/t/how-to-make-an-infinity-of-sphere-and-make-them-rotate-around-like-stars-at-sky/32959/14 "2022-08-14T07:16:21Z")

</div>

I’ve been going through all the documentation in Babylon js camera section but I didn’t find such things so far 😫
