# Let the particles to shoot at the camera straightly

**URL:** https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511
**Category:** Questions
**Tags:** particles
**Created:** [June 9, 2023, 12:30pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511 "2023-06-09T12:30:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![heyefeng229](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@heyefeng229](https://forum.babylonjs.com/u/heyefeng229)
#### Post date: [June 9, 2023, 12:30pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/1 "2023-06-09T12:30:49Z")

</div>

I want to let the particles to shoot at the camera straightly.  
Can the particles rotate around the z axis ?

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

---

<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: [June 9, 2023, 8:29pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/2 "2023-06-09T20:29:02Z")

</div>

Adding @PatrickRyan the master of particles.

---

<div class="post-metadata">

### Author: ![PatrickRyan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/patrickryan/32/3417_2.png) [@PatrickRyan](https://forum.babylonjs.com/u/PatrickRyan)
#### Post date: [June 9, 2023, 9:28pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/3 "2023-06-09T21:28:26Z")

</div>

@heyefeng229, from what I understand of your question, you want the particles to rotate so that the long dimension of the particle in your example points along the path of emission. By default, the orientation of particles in Babylon.js when billboard is turned off is perpendicular to the direction of emission:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/e/9e6ae203a15871a1dcf6e71ef225aa891ae391db.png)

This means that any scale you do to X or Y, or any rotation on the particle is done on the same axis that the particle moves. What you are asking for is a worldRotationOffset so that the particle can be rotated to not align with the axis of emission. Unfortunately, we don’t have that as a feature for particle systems right now. We do have the ability to set a [worldOffset](https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro#world-offset) on the particle to make the particles emit at a specific offset from the origin. This is helpful in aligning particles to emit from one edge like we see below:

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/e/1/e169925897691fe9b21ed8f490403bd1a8eb020a.png)

However, I’m not sure if adding a worldRotationOffset to the particle system would be more costly than worldOffset or if there may be a perf hit that is too much for a large particle system. @sebavan, what do you think about that?

---

<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: [June 9, 2023, 9:51pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/4 "2023-06-09T21:51:07Z")

</div>

Yup I an kind of afraid of the perf impact. In this case @heyefeng229 you might be able to rely on the custom update instead ?

---

<div class="post-metadata">

### Author: ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)
#### Post date: [June 10, 2023, 6:50am UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/5 "2023-06-10T06:50:09Z")

</div>

> [@sebavan](#):
>
> you might be able to rely on the custom update instead

Hum. Sry to intervene but I find this interesting. I’d like to understand how by update you could have the particles rotate X to Z and facing the camera, knowing that the particle is a sprite? At the extreme, if the particle was really rotated to face the edge only (correct me if I’m wrong) but then you wouldn’t see anything anymore, since there is no volume. May be you could demonstrate?

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

---

<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: [June 12, 2023, 3:24pm UTC](https://forum.babylonjs.com/t/let-the-particles-to-shoot-at-the-camera-straightly/41511/6 "2023-06-12T15:24:47Z")

</div>

> [@mawa](#):
>
> At the extreme, if the particle was really rotated to face the edge only (correct me if I’m wrong) but then you wouldn’t see anything anymore, since there is no volume

Yes but I think that is what the OP wants ?
